texts: Magento2 : How To Add New Words To Arabic Language Pack ar_SA.csv File

texts:
Hello I want to add new words to already available arabic language pack csv file.

Can anyone tell me how i can add new words?


texts:
I have a problem with my category layout. Sometimes there is a gap between products list, just like a product is missed.

Any ideas how to solve this riddle?

Thank you.


texts: Redirecting admin user before creating an order in adminpanel issue M1

texts:
I have a custom condition for customers . If that condition is satisfied I would like make a redirect with a message that 'the order cannot be created'.

I used the sales_order_place_before event to check my condition and then make the redirect. My problem is that even if my condition is satisfied the order is still created and my message is displayed. How can I prevent the order from being saved ?

This my observer code:

        $blacklist = Mage::getModel('mynamespace_mymodule/customers')->getCollection()
                   ->addFieldToFilter('email', $observer->getEvent()->getOrder()->getCustomerEmail());
        if ((int)$blacklist->getSize() === 1){
            Mage::getSingleton('adminhtml/session')->addWarning('Cannot create the order! The customer is added to the blacklist!');
            Mage::app()->getResponse() ->setRedirect('adminhtml/sales_order_create/')->sendResponse();
            return;
        }


texts: products upload with csv magento 1.9.0.1

texts:
I am trying to upload products on magento 1.9.0.1 with CSV file. I added one product directly in magento then downloaded CSV file for adding more products on it.

When I import products they do show on magento backend but do not appear on store front end.

Please advise what I would be doing wrong?


texts:
I am trying to reindex the data in magento via SSH i have memory_limit = 1024M.
But when i try to reindex the data it stopped suddenly and Killed comes written on screen. I have imported near about 50000 products . Before import, indexing was fine.
Please answer if anybody already been through this kind of error.

Thanks


texts: vertical menu every page & Header menu navigation

texts:
I am trying to customize header menu and vertical menu (left menu) in Magento cms

When i click on the category, i will be redirected to next page but the complete list of categories  is no more displayed on that page. I just want the complete list to be displayed on all pages that a user is being navigating through the categories list.

i am using below code on CMS -> Pages -> Homepage -> design->Layout Update XML

<reference name="left">
    <!--<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>-->
        <block type="catalog/navigation" before="-" name="catalog.vertnav" template="catalog/navigation/vert_nav.phtml"/>
</reference>

how to display the left menu in all pages and  how to customize header menu like
 HOME ABOUT US Blog

I also posted the same question on stackoverflow, Please look at these fr screen shots

Please suggest me for developing good looking magento website


texts: Virtual products Login Restriction. Magento 1.9

texts: I have enabled guest checkout, i need if virtual products available in cart login mandatory, how can i set the condition like if virtual products available in cart login mandatory.


texts: Can see out of stock products even though out-of-stock products set to NOT show?

texts:
As the title says, I have set the out-of-stock products to not display when we run out of stock, but despite clearing cache, I can still see out-of-stock products visible on the site, even though it clearly says in the listing that we are out of stock.

Any ideas?

Sure it's a simple one.

Thanks


texts:
my project is build on magento 2.0.7. Do you know what are the customer password rules? I can not find the Number of Required Character Classes, Maximum Login  Failures to Lockout Account, Minimum Password Length on customer configuration, like magento 2.2.x has.

Thank you all


texts: Adding a column to export but hiding from the grid?

texts:
I've created a custom report.  The report has a significant number of fields in it which are required for when it's exported in CSV form.

What I'm trying to figure out is if there's a way to omit the rendering of some of the fields on the front-end grid.  Most of them aren't really important for the filtering process in admin and are only used when the report is downloaded for further parsing outside of Magento.

I would expect this to type of functionality to reside in the grid class as that's what generates the actual grid and, later on, the exported CSV but I don't see anything that looks like it deals with visibility.

Before I go in and override methods in this class for our custom report, is there a lesser-known way to accomplish this that's easier than my adding some kind of "showInGrid" property via the addColumn property array?

  TL,DR is there an easy way to have fields exported (in say, CSV or
  XML) but omitted from the admin grid?


texts:
I need to re-create a calculator page as per the one on link here, https://www.theramppeople.co.uk/ramp-length-calculator/, this would be to our french shop that is why we can't use the same link as above, I have created the page https://www.rampes-directes.fr/calculatrice-de-longueur, but the results are not being displayed, for the moment this has being only worked out on the admin panel, I have basically used the content from the English "page" and translated to French.

On the result "text" we have this :

Longueur de Rampe Requise:
? feet (? mm)

Anyone know where do I get the results from ?

Many thanks for your help.


texts: Can't see Developer mode in Magento 2.2.9 after enabling it

texts:
When I enable Developer mode in Magento, I don't see it in the Configuration Settings:

I used command

  php bin/magento deploy:mode:set developer

I'm using Magento 2.2.9 and Ultimo Theme version 2


texts: Advanced Pricing "Cost" attribute is missing in Magento 2

texts:
That is how the advanced pricing page is supposed to look like.  Mine looks exactly the same except the "Cost" field is missing.  Why is this and how can I fix it?

Also, does this cost field actually have any functionality?  I'm looking to calculate prices based on my cost.  Is that possible in Vanilla Magento 2.1?

Thanks


texts: Execute custom JS on 'Add to cart' completion

texts:
I'm currently trying to implement a very simple JS that should take the product name, quantity and price and store it in an json array so I can use it later on as part of the basket abandonment program. I want the data to be stored when someone clicks on the 'Add to Basket' button. Here's the code I have at the moment:

  var basketAllPages = document.getElementsByClassName("action tocart primary");
  var itemListTwo = [];
  var basketOnAddItem = function(){

    $('.minicart-items-wrapper').each(function() {
        var productOnAdd = {
            name: $(this).find('.product-item-name a')[0].innerHTML,
            value: $(this).find('.minicart-price .price')[0].innerHTML.substr(1),
            quantity: $(this).find('.item-qty.cart-item-qty').val()
        };
        console.log(productOnAdd); //to display the product details
        itemListTwo.push(productOnAdd);
        console.log(itemListTwo) // to display an array of products
    })

  };

  for (var i = 0; i < basketAllPages.length; i++) {
      basketAllPages[i].addEventListener('click', basketOnAddItem, false)
  }

It does work to some extent, but there's a small problem I can't figure out how to solve. Basically it works for the 2nd 'add to basket' click onward, but it shows the details of the product added before.

E.g:

Add to basket click 1: product name AA, console displays nothing;
Add to basket click 2: product name BB, console displays product AA
details and prints the array of object AA;
Add to basket click 3: product name BB, console displays product BB
details and prints and array of objects AA and BB.

I'm guessing it has something to do with the fact that the 'click' event is fired before there're actual products in the basket. I could hack it with the setTimeout() method but that would be very dirty and there's probably a very easy workaround that I'm missing.

Any advice will be much appreciated.


texts: I need to add a extra field in product rest api response - Magento 2

texts:
I want to add a field "slider" in /rest/V1/products/:sku

I created a custom module and in my di.xml i have added the following code

<?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="Magento\Catalog\Model\Product" type="mymod\Catalog\Model\Product" />
    <preference for="mymod\Catalog\Api\Data\ProductInterface" type="mymod\Catalog\Model\Product" />
    <preference for="mymod\Catalog\Api\ProductRepositoryInterface" type="Magento\Catalog\Api\ProductRepositoryInterface" />
    <preference for="mymod\Catalog\Api\Data\ProductInterface" type="Magento\Catalog\Api\Data\ProductInterface" />
</config>

And I have added a method to Api/Data/ProductInterface

const slider = 'slider';

    public function getSlider();

    public function setSlider($slider);

I have implemented the two methods in

<?php

namespace mymod\Catalog\Model;

class Product extends \Magento\Catalog\Model\Product implements \Augmentes\Catalog\Api\Data\ProductInterface
{
    /**
     * {@inheritdoc}
     */
    public function getSlider()
    {
        return "test";
    }

    /**
     * Set slider value
     *
     * @param string $slider
     * @return $this
     */
    public function setSlider($slider)
    {
        return $this->setData('slider', "");
    } }

I also extended the ProductRepositoryInterface
changed the routes in webapi.xml

Still the field not coming in response. Anyone please advise.

Thanks.


texts: Table is not created again when removed magento 2

texts:
I have a module that creates a table. I removed that table and also removed the entry of that module in "setup_module" too.And after doing all that on page refresh it is not creating the table again. And I again run setup upgrade command. I have flushed the cache, done static content deploy and tried disabling and again enabling the module, but still it is not creating the table in magento 2.

Can anyone tell me what am I doing wrong here.

Thanks


texts: Migrate orders from Magento 1.x to 2.x using the Magento data migration tool

texts:
The products, attribute sets, prices, categories, etc has been already migrated from Magento 1.x to Magento 2.x. I want to migrate the orders now.

Is it possible to migrate only orders from the Magento 2 data migration tool or is there any other way to migrate the orders?

I am also thinking of mapping the sales_flat table of Magento 1.x to the sales_order table of Magento 2 and push the CSV from MySQL.

Is there any other way?


texts: How to Apply the Coupon Code only to the products that are "Not on Sale" - [Without Special Price]?

texts:
My conditions are working fine when i check out with single product which is not having the special price, The same condition is working fine with the products has special price.

So the problem is with the condition when i have both type of products in my cart i.e. one which is having the Special price and other that doesn't has the Special price, In this condition the coupon is working with both the products. It shouldn't work with the products with the special price.


texts:
I have stored country id in my custom table. How to join the my custom collection with country collection to get a Country Name.

I have tried below code but its not working :

$collection = Mage::getModel('XXX/XXX')->getCollection()->addFieldToSelect(array('city','country_id'));
$collection->getSelect()->join(
    array('second'=>$collection->getTable('directory/country')),
    'main_table.country_id = second.code',
    array('second.name')
)->getData();

Hope someone will provide some useful information.


texts: Magento website showing error when uploaded to Hostgator server

texts:
i have created a website on magento1.9 platform it is running properly on my localhost Xmapp server. Now i uploaded my website data to hostgator server and made all necessary changes like nameserver pointing, local.xml file changes but still my url is showing a error. please refer my domain link. http://shopamaryllis.com/
Please guide me what i have to do. I am a new learner of website creation.


texts: How to Generate Paid third party coupons in Magento 1.9 Platform

texts: I am a Newbie to Magento Platform.I wanted to generate third party coupons just like paytm or freecharge.Is it possible in magento or is there any extension for it??


texts: Does anyone know any technical reasons as why bundle products with dynamic pricing cannot have custom options?


texts:
I have the following situation:

I have a multiple store views and for one of the store I have let's say this url:

wwww.myurl.com.

What I try to do, is to change the base url to : www.myurl.com/something/ to be the default base url.

So all the pages should look like this: www.myurl.com/something/page

If I change this from Store -> Config -> General -> Web I receive a 404.

What is the best approach to do this thing?


texts:
How do we load the saved cards (vault) of a registered customer in Magento 2? This is how it's done in Magento 1:

$savedCards = Mage::getModel('tokenbase/card')->getCollection();
$savedCards->addFieldToFilter('active', 1)
    ->addFieldToFilter('customer_id', $customer_id);
$card = $savedCards->getFirstItem();


texts:
Magento uses the default process when product is “Add to Cart” from product detail page: product is added to cart and redirect to the cart page or user can stay on product page. We need user to be directed to the same page. And, also, display a message Above the "Add to Cart" button : "Product Added to Cart".

Please tell how to display this message.

Thanks in advance !


texts: Magento 1.9 show single item price when minimum order amount is 10

texts:
On our webshop, we have a product that has a minimum order amount of 10.
However, this also makes Magento show the price of the item as 10 times the cost of a single item.

This scares off a lot of potential customers, as they think the item is very expensive.

Is there any way to have Magento show the single item price on the product page, and only show the total amount in the shopping cart and invoice?

Thanks in advance!


texts: Bugs after upload Image in Magento admin panel

texts:
I have a problem with Magento, because when I try to upload files, images in the Magento admin panel location:

1. Catalog -> Manage product -> Images

I get the error: "SSL Error: Invalid or Self-signed Certification"

2. System-> configuration-> Catalog-> Catalog-> Product Image Placeholder

I get the error: "Unable to load the webpage becouse the server sent no data."

The following link is screenschot of these errors.
http://prntscr.com/7hjyig

Probably ubuntu server is misconfigured, but I gave full rights to the folder media and for other directories and it does not help..

I installed correctly in the domain SSL certificate
but still they show up the same bugs.
Please help me get tired of this problem for a few weeks ..


texts:
i make custom mail template.
my template variables are $TemplateParameter=[
           'customerName'=>$getOrderParams['customerName'],
           'orderItems'=>$getOrderParams['productinfo']
         ];

and my 'html' file code is

{{template config_path="design/email/header_template"}}

{{trans " Hello %customerName," customerName=$customerName|row}}

                    {{trans "Item"}}
                    {{trans "Sku"}}

                    // want to set Items and Sku here

{{template config_path="design/email/footer_template"}}

Can anyone tell me please how set orderItems array set in table body .

I received  mail correctly but now want to set content .

Plz guide me how set Items and Sku in the mail content ?


texts: Check wether a product is configured to be in the parent category or not wihtout using anchor links

texts:
I need to find out all products that are in subcategories but are NOT in their specific parent category. The store I work on cannot use is Anchor and the reporting is based on SQL.

This is what I got so far:

SELECT cat.product_id, GROUP_CONCAT( cat.category_id ) , product.sku
FROM catalog_category_product AS cat, catalog_product_entity AS product, catalog_category_entity AS wCat
WHERE cat.product_id = product.entity_id
GROUP BY cat.product_id

which selects me all products and their specific SKUs + selected categories.

Next step is to sort out products that are in a parent category AND a child category, which leaves me with a list of Products that are in a child category, but not in a parent category.

Basically:

Show me all products that are in a child-category but NOT in their respective parent category. For example I have a parent ID 2323 in catalog_category_entity which is a desired parent category. It has level == 2, because 0 is the default category (not visible) and 1 is the first root category (not targeted). Level 2 determines whether a category is a parent category or not.

How would I change my SQL to achieve what I want?


texts:
We have an install of Magento running a number of sites for our travel company. The sites include a UK, US, European and South African store as well as a number of white label sites. The products within each store are the same with a number of them having a custom option for "Travel Date".

We've decided we'd like to make some dates unavailable from some sites whilst still being available for others. So for example the date '20th November 2014' would be available for users booking in the US or UK but not South Africa.

Selecting the correct 'Store View' from the top of the left hand column within a product, then selecting 'Custom Options' shows me the custom options for that product but removing one option removes it globally. Is there a way to remove a custom option for one store without removing it from the product completely?


texts: How to replace SKU with a custom attribute on the frontend

texts:
our product has SKU and P/N number. All product's SKU has the same, but the P/N will depend on the country, so I've created an attribute "P/N" and want to show P/N on the product page instead of SKU.

It is possible to replace SKU on the frontend with P/N?

can anyone help me with this?


texts: Can't remove product image because "This is a required field."


texts:
Want to merge order view in my order
Mean that, when I click on my orders tab, see all orders with detail not just orders number and view icon.
how can I merge these two pages?


texts: How do we get an URL redirection when we click on checkboxes for every internet browsers?

texts:
Here is my issue.

I am working on the layered navigation menu.
In "filter.phtml", I added checkboxes to "li" tags, so that we can click on them in the frontend to get our research filtered.

I tested the filter with Mozilla Firefox, Internet Explorer, Google Chrome an Dolphin browsers.
Clicking on checkboxes to activate the filter only works with Mozilla Firefox. With the others, I just get the checkbox selected but nothing else happens.

Do you know the method to get an URL redirection working with the most recent internet browsers?
Thanks for your help.

Below is the code I use:

<ol class="filter-<?php echo trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($this->_filter->getRequestVar())), '-'); ?>">
<?php foreach ($this->getItems() as $_item): ?>

    <?php if (!$this->getFilterOptions()->getDisableNoResultOptions() || $_item->getCount() > 0 || $_item->getMSelected()): ?>

      <?php if ( $_item->getMShowSelected() ): ?>
         <a href="<?php echo $_item->getRemoveUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" >
            **<input type="checkbox" class="checkbox" value="lien" name="rou" checked="checked" />**
            <?php $img = $_item->getValueString(); ?>
    <?php $path = Mage::getDesign()->getSkinBaseDir();
    if (is_file($path . DS . 'images/layer/' . $img . '.png')): ?>
    <img src="<?php echo $this->getSkinUrl('images/layer/' . $img . '.png') ?>" alt="frame shape" />
    <?php endif; ?>
            <?php echo $this->escapeHtml($_item->getLabel()) ?>

      <?php else : ?>
         <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>" title="<?php echo $this->escapeHtml($_item->getLabel()) ?>" >
            **<input type="checkbox" class="checkbox"  value="lien" name="rou" />**
            <?php $img = $_item->getValueString(); ?>
    <?php $path = Mage::getDesign()->getSkinBaseDir();
    if (is_file($path . DS . 'images/layer/' . $img . '.png')): ?>
    <img src="<?php echo $this->getSkinUrl('images/layer/' . $img . '.png') ?>" alt="frame shape" />
    <?php endif; ?>
            <?php echo $this->escapeHtml($_item->getLabel()) ?>

      <?php endif; ?>

   <?php else: echo $this->escapeHtml($_item->getLabel()) ?>
   <?php endif; ?>

    <?php if (!Mage::getStoreConfigFlag('mana_filters/display/count')) : ?>
        (<?php echo $_item->getCount() ?>)
    <?php endif; ?>


texts: Add default filter to categories in Magento 2?

texts:
I would like to show products in all categories only if their tier prices were set. I had some success with a plugin for the Layer Model (with afterGetProductCollection). I just added join to the select (joined the ...tier_price table).

One problem remains: the product count and pagination is wrong (as if the filters weren't applied) and no matter what I try, I am not able to find a way to apply a central filter condition.


texts: Web API: Product set use default status for store view

texts:
Our products are created and updated via the web API. When we update a product for all /rest/all/V1/products/123 and set status: 2 the product is disabled. But per store view it's still enabled because the checkbox "Use Default Value" is not checked.

I tried to send use_default_status: 1 per store view (rest/german/V1/products/123)like this:

{
  "product": {
  "sku": "123",
  "name": "My Product",
  "use_default_status": 1
  }
}

But then I get the following error:

  Property "UseDefaultStatus" does not have accessor method "getUseDefaultStatus" in class "Magento\Catalog\Api\Data\ProductInterface"

Is it somehow possible to set the use_default_status checkbox via web API? The best would be if I could set it without having to push the product for the store view.


texts: In sales order email i'm getting "Pay with Credit/Debit Card or Paypa" twice." magento 2

texts:
In my sales order email i'm getting

"Pay with Credit/Debit Card or Paypa" twice.

How to remove "Pay with Credit/Debit Card or Paypa and Payer Email" that i marked in attached image. Please let me know?


texts: Google Analytics - Search Console Verification Problem

texts:
I'm trying to add google analytics for my client. I've added the UA-# to Stores > Configuration > Sales > Google API. I see that it's been added but I need to confirm with Google Search Console. They state:
"The Google Analytics tracking code on your site is in the wrong location. You can verify site ownership with the asynchronous snippet placed in the  section of your home page."
All I'm finding is information that seems to be outdated on how to add the actual Google code to the website. I can't find where to add the code to the HEAD HTML. Please help.


texts: Magento Execute custom block from CMS Page in PHP (template file)

texts:
I am planning to show a product list on the front page that can be sorted by category with a drop-down box.

Previously I was loading my products with the static category ids in a CMS-Page and display/hide it if the user was selecting a category.

My problem is that this solution is not really dynamic. If I add a new product category, then I need to edit the CMS Page and add a hidden <div /> with the product grid on it.

The product grid is generated by the below code:

{{block type="catalog/product_list" category_id="16" template="catalog/product/list.phtml"}}             )

I want to generate this divs dynamically in my frontpage template. I tried this:

$_layout  = Mage::getSingleton('catalog/product_list');
$_block   = $_layout->createBlock('catalog/product_list')->setTemplate('catalog/product/list.phtml');

echo $_block->toHtml();

But it doesn't work. I need a loop through all categories with their ids(i already have this part) to generate a hidden grid of the specific products in it.


texts:
I add JS file in custom module

Vendor\Module\view/adminhtml/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <head>
     <css src="Vendor_Module::css/test.css"/>
     <script src="Vendor_Module::js/test.js"/>
   </head>
</page>

Add  js file in web folder as below path:

view/adminhtml/web/js/test.js

code for checking   .

require([ 'jquery', 'jquery/ui'], function($){
    $(document).ready(function($) {
        console.log('asdf');
    });
});

File include in admin panel But error is TypeError: require is not a function
how can see message in console ?


texts: Persistent Shopping Cart Issue with customer groups

texts:
I'm running into an issue with persistent shopping carts and customers from a certain customer group.

Here's the scenario:

A customer tagged to my wholesale customer group logs into the website, they then see their special pricing due to their customer group. The customer then logs out of the website (at that point it leaves the "WELCOME, USER NAME! (NOT USER NAME?), obviously with the actual customer name in the place of USER NAME). The customer then comes back to the website and sees their name in the top of the screen and their special pricing. They then continue to shop and checkout. When they go to checkout, if they don't login, it processes them as a normal not-logged in customer.

I'm using the one-step-checkout from http://magestore.com, so the customer doesn't see the login prompt immediately like they do with the default Magento one page checkout.

Is there anyway to fix this? Essentially, I want to know if there's a way to do away with the "not customer name" block at the top of the screen, regardless of customer level.

This block is labeled mage_persistent_lock_header_additional and it's a core file, so I'm hesitant to edit frontend/base/default/template/core/link.phtml


texts: Admin Menu doesn't slide out and configuration menue doesn't open. Also buttons not working

texts:
Preconditions (*)

Magento 2.3.1
Ubuntu 18.04.2 LTS
PHP 7.2.17

Working in dev environment and and enabled few optimization parameters which made admin panel inaccessible and buttons were don't appear correct with proper text , appears shrinked.
Admin panels don't draw out even if does then none of the buttons registers a click and hence I'm not able to change the configurations back.
Steps to reproduce (*)

I was trying to speed up my webstore but it created a havoc.

1.Enable JS minify/merge/bundling
2.Enable CSS minify/merging
3.Enable Html minify
4.Enable Embedded Translation Mode for JS translation strategy.

Tried changing back

1.Enable JS minify/merge/bundling
2.Enable CSS minify/merging
3.Enable Html minify.

but no avail.


texts: Fotorama Fullscreen has a problem when leaving fullscreen mode in Magento2

texts:
On a lot of mobiles or ipads, I had tried to click open the fullscreen and then exit fullscreen. The page will dead every time. Should I check the fotorama version ….? Or any solution for this problem?

Here is the demo video =>
https://youtu.be/krxrjMBuK1A


texts: Magento2 routeId_controller_action make landing page

texts:
I make a Block in my custom module and there a logic exist . I have also make controller ,xml file(for define block class and template file) ,template
in Controller nothing custom code exist just pagefactory exist in execute method.
Now Path is domain.com\routerid\controller\action

But I need   domain.com

How can i make domain.com\routerid\controller\action on landing page ???


texts: Cart with fix amount - variable products

texts:
we want to create a "special" Shop where we offer 50€ packages of our products. Customers can choose variable products which they want to put in their package. But only up to the total amount of 50€.
For this max value I found an extension: Magento Maximum Allowed Order Amount

The problem is a cart amount <50€. The customers should have the freedom to complete the order even if the amount is lower. But in this case I want to charge the 50€ anyway ;)

Any ideas, suggestions?


texts: When Trying to Patch Magento 'Tool(s) “patch” is(are) missed, please install it(them)'

texts:
I have been trying to apply some Magento patches.

Code :-

print("<PRE>");
passthru("/bin/bash PATCH_SUPEE-5344.sh");
print("</PRE>");
echo "Done";

but getting the following error:-

Error! Some required system tools, that are utilized in this sh script, are not installed: Tool(s) "patch" is(are) missed, please install it(them).


texts: Images not showing properly in email when site is password protected

texts:
My Magento development website is password protected through .htaccess and .htpasswd. I have a share via email feature in my website. On click of product share an email is sent with image of product.

Email is sent no issues in this but issue is images are not shown in the email. If i remove password protect rule from .htaccess file and share the product, image is seen properly in the email with out an issue.

I want to display image in the email when my site having password protect rule in the .htaccess


texts: SEO setting category URLs in Magento 2 buggy?

texts:
I've got category URLs like .*/.html in Magento2. Ideally I prefer .*.html, however I'll settle for .*/.

So I go to the Magento admin and change the preference Stores -> Configuration -> Catalog -> Search Engine Optimization -> Category URL Suffix to the empty string

However with caching disabled and a reindex, the category pages are return HTTP 404(page not found). I've even tried deleting all products and categories, then reloading with the revised setting, but still getting 404(page not found).

Any idea what might be wrong?


texts: Duplicate column position in products->category->Products in Category. Magento 2 ui components

texts:
Began to duplicate the column in the ui component 'position'.
Haw to fix ?


texts: Magento creates new eav attribute values instead of updating existing ones

texts:
I am facing a bad maintained Magento 1.9.1.1 installation and saw in the  catalog_category_entity_text table many duplicate entries. The duplicates have the same attribute_id, entity_id, and store_id but different values.

This affects multiple attributes, entities (categories) and stores. It looks like the following:

My presumption is that Magento instead of overwriting the current value just saves a new entry. E.g. I have a category with the description "description 1" and now I change it to "description 2" then I will find both values in the table.

I don't think this is actually Magento default behavior but rather caused by any third party extension or am I wrong?

If this is not default behavior did anyone see something like this before and has a way of debugging this issue?


texts: How to add custom admin layout to show iFrame in Mageno 2

texts:
I have created a custom module and trying to show the iframe in admin area.

Created a new action and able to access the url in browser.

Layout look like

  app/code/VENDOR/MODULE/view/adminhtml/layout/VENDOR_MODULE_registration_index.xml

Template look like

  app/code/VENDOR/MODULE/view/adminhtml/templates/test.phtml (it contain
  the iframe as <iframe src="https://www.google.com"></iframe>)

I have tried

<body>
    <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="One" template="VENDOR_MODULE::test.phtml" />
    </referenceContainer>
</body>

OR

<body>
    <container name="root" label="Root">
        <block class="Magento\Framework\View\Element\Template" name="One" template="VENDOR_MODULE::test.phtml" />
    </container>
</body>

But the custom phtml file does not render on the browser?

How to set custom HTML content/iFrame in the admin area?


texts: User Login not Working after Migration 2.2 into 2.3.1

texts:
I have Just Migration Magento 2.2 store in 2.3.1 Version but Customer User login not working after that. Give me below error.

  The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.


texts: Magento 1.9 Collection returning Qty Null

texts:
im using this code to get all product collections and Qty but is returning null

$products = Mage::getModel('catalog/product')
        ->getCollection()
        ->addAttributeToSelect('*');

        if(!empty($products)) {
            foreach($products as $product) {
                $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($products);
                $qty = $stock->getQty();
                var_dump($qty);
            }
        }

this code return "NULL"


texts: Magento Error "Order saving error: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction" at backend

texts:
Magento showing error Order saving error: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction,  on placing order at backend.
Still Order has been saved with status "pending" and then if I generate invoice, this does not show MRP in invoice PDF.

So I need to cancel this order and have to reorder this, this time there no error appears.

I am not aware about this what is happening there and its cause.

can anyone help to to resolve this problem


texts: Magento2 API - Why are null values never type casted

texts:
When creating a SOAP client for example in Visual Studio, currently there is a Problem, that objects cannot be deserialized when they contain scalar types with a null value.

Using a programming language with strict types, float, int, etc.. are not allowed to be null, instead should be casted to 0.0 or 0.

In the SOAP Api, all values are type casted except when they are null: https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/Reflection/TypeCaster.php#L25

Is there any reason for this?

Magento Issue: https://github.com/magento/magento2/issues/3605


texts: Inserting table in product tabs is forced to the bottom

texts:
I can't seem to find a solution for this but whenever I try to add a table in the products tab in the backend, the frontend will show the table forced down to the bottom of the page. Images and any other code seems to work normally and have it flushed to the top like it suppose to.

backend

frontend

I tired placing it in a DIV layer with it aligned to the top. No luck...


texts: Not getting the information about orders - NULL (line level)

texts:
I've been trying without success to obtain the line level information about a specific order but i am getting the header information.

Take a look at this picture:

This is my query:

select o.increment_id, o.status, oi.price_incl_tax, t.carrier_code, o.created_at, oi.price_pvp, oi.created_at, o.shipping_instruction, o.payment_term
from sales_flat_order o
join sales_flat_order_item oi
   on o.entity_id = oi.order_id
left join sales_flat_shipment_track t
   on o.entity_id = t.order_id
where oi.parent_item_id is null

What's wrong? Can you please help me to solve this?

EDIT:

This is what i found in MYSQL:

The problem here is that i do not understand how should i look into this in order to obtain what i need :/.


texts: magento 2 how to create static block that contains categories need to display in home page

texts: I want to create an static block that contains categories and their products need to display in home page in magento2


texts: Got confused with custom Adminhtml controller

texts:
I am creating module and I have added button to my module configuration section which have to call one of my methods.

So when I click button, it should call controller for example: localhost/index.php/admin/framexport

in config.xml, after  i added:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <namespace_mymodule before="Mage_Adminhtml">Namespace_Mymodule</namespace_mymodule>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

I created at Namespace/Mymodule/controllers/FramexportController.php with code:

class Namespace_Mymodule_FramexportController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        Mage::log("TEST", null, 'test.log');
    }
}

when I try to go "localhost/index.php/admin/framexport/" or "localhost/index.php/admin/framexport/index/" it redirects me to dashboard and indexAction() is not called - no logfile created.

What am I missing or maybe I misunderstanded some part of code?


texts: Why the button doesn't working on a UI Component Admin Form?

texts:
I'm trying to create a Button Field on a UI Component Admin Form but it looks like it's not calling the Controller. It doesn't call the custom controller,But it works when i call the defaults of Magento (save, delete, back, reset), why?.
What could it be?
Button field code
<button name="delete_header">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="buttonClasses" xsi:type="string">custom-button-class</item>
            <item name="actions" xsi:type="array">
                <item name="0" xsi:type="array">
                    <item name="targetName" xsi:type="string">api_data_form.api_data_form_data_source</item>
                    <item name="actionName" xsi:type="string">api/data/deleteheader</item>
                </item>
            </item>
        </item>
    </argument>
    <settings>
        <displayAsLink>false</displayAsLink>
        <title translate="true">Delete Selected Header</title>
    </settings>
</button>


texts: Bundle Price depending on items in bundle

texts:
This is a complex question about determining bundle prices. I have already hired a developer who cannot figure out how to make this work, and have spent days looking at extensions, so am reaching out for other suggestions.

I need to have a product page where a customer can choose 3 configurable items, and add them to the cart together. We can do this easily with a bundle that has configurable items - no problems.

However, we need each product to be optional so the customer can buy any of them, and the pricing to change depending on how many items are added, such that:

1 item: bundle price = item price
2 items: bundle price is fixed at $79
3 items: bundle price is fixed at $99

Sounds simple?

The issue is that the individual products do not have the same price. Product A is $65; Products B and C are $40 each. If you give the bundle dynamic pricing, the sum of products A + B would be $105 (instead of $79), and all 3 products will be $145 (instead of $99). Creating bundles with 2 items and 3 items and giving them fixed prices is unfortunately unacceptable, as it will require customers to navigate between many pages as they go adding all the combinations of bundles they need, which we've seen significantly decreases our sales.

The only solutions I can think of are:

Write a script that looks at how many items are selected on the product page, and manually override the bundle price when clicking add to cart (is this possible, how would I do it?)
Host multiple fixed price bundles on the same page, so the customer can configure a 3 item bundle, add it to the cart, then configure a 2 item bundle, etc etc without leaving the page (compromise that effectively uses bundles as part of a grouped product - how would I do it?)
Allow customer to add individual items to the cart (using a grouped product with configurable options extension), and create a shopping cart price rule to determine the discount

I tried pursuing the last option, but was not so far able to solve this. The logic would have to determine how many 3 item sets you could make from everything in the cart, allocate the right discount, then determine with the leftover products how many 2 item sets, give the discount, then leave the remaining individual items at full price.

Any suggestions as to how I could achieve any of these solutions, any extensions I haven't been able to find, or any other solution would be fantastic! I would also be happy to pay a developer that can achieve this.


texts: Magento Product Forms Dropdown Labels & Values

texts:
I have a dropdown attribute, TruckID.
I have 2 values Val1,Val2.(Visible) however, when they save I need these to be .08 & .10.
We actually have dozens of values, but the workflow I have to have. I see there on many other 'admin' forms for contact, etc, but for Magento Product Attributes, I'm not sure how to assign something different that what the admins see in the dropdown.


texts: Magento 2: Sort Product collection by Last update Product

texts:
I am trying to fetch product collection based on crated custom attribute that is is_home_page.

Check by below code.

echo "<pre>";
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
/** Apply filters here */
$collection = $productCollection->addAttributeToSelect('*')
->addAttributeToFilter('show_on_home_page',['eq'=>'1'])
->setPageSize(4)
->setOrder('sort_order','DESC')
->load();

So, here what i need is Currently i want to display products on home page which product has attribute set to Yes.

I can able to get collection of products which has attribute Yes.

But i would like to get collection in order to last updated product.

how can i achieve this ?


texts: Magento 2.2.6: minicart still show value(count of products) after clear cart

texts:
After clear(removing all products) shopping cart shows nothing, but still show count of products value on minicart.

tried to create sections.xml and flush cart after click 'distribution/cart/clear' route:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
    <action name="distribution/cart/clear">

    </action>
</config>

but have fail.

here is link to flush cart on cart-info.phtml:

<a id="clear-cart"  href="<?php echo $block->getClearCartUrl() ?>"><?= 'Empty cart' ?>


texts: Using GraphQL query and filtering products by category_id, I get empty items array

texts:
I try to make a simple request using graphql and to get a response from my magento. I have a parent category named Products(id:"3"). In this one, there are 3 subcategories A(id:"5"),B(id:"6"),C(id:"7") for example. Each subcategory has a single product assigned. I use the products query and filter products by category_id like:
{
 products(filter: {category_id: {eq:"5"}}){
  items{
    name
  }
 }
}

This query returns an empty items array, and does the same for all subcategory ids (B with id:"6" and C with id:"7"). Based on the example i provided above it should return the product of category A, am i missing something? Although using the same query with eq:"3" returns all the products. Is there something special with subcategories and this query returns only parent category?


texts: Magento 2.3.5 Customer registration email domain @xxx.com.xx crash

texts:
I am new with Magento and I am using Magento 2.3.5.
When I test on the Create new customer account, fill up the field Sign-in information with using email domain with @xxx.com.tw , @xxx.com.jp or @xxx.com.hk , the server gets crashed.
Please advise how to fix it. Million thanks.


texts: In which Magento version the Google ReCaptcha was introduced?

texts: I'm very curious to know which Magento version consists default Google ReCaptcha module.


texts: print invoice controller file location in admin

texts: i want to know the controller or block file location that is being used to generate pdf invoice using button print in this file. please see image


texts: Footer cms block not recognized as separate block (not with template hints and Lesti FPC)

texts:
when placing cms block in our website footer like thi with the code below. We see that the block id 'shopper_footer_links' is not picked up as a separate block. (when testing with template hints + Add add Block Names to Hints it is not shown). The only block name we see is html_footer (and not the blocks that reside within it).

I am asking  because we use LEsti FPC and do not want to cache shopper_footer_links. But if it is not recognized as a block it cannot be cached/not-cached separately.

question: is there an easy way so Magento does see it as a separate block id? Or does this involve writing an extension (adding the html to something like footer_after)?

Many thanks, Sean

I tried these two methods. Same outcome.

    <?php echo $this->getBlockHtml('shopper_footer_links'); ?>

    <?php echo $this->getChildHtml('shopper_footer_links'); ?>

and in layout xml

    <reference name="footer">
    <block type="cms/block" name="shopper_footer_links" after="shopper_footer_links">
        <action method="setBlockId"><block_id>shopper_footer_links</block_id></action>
    </block>
    </reference>


texts: magento 2 : how can i add image using ui component to database form my ADD NEW DATA UI FORM using model not block

texts: I have searched a lot but couldn't find exact method for uploading image using ui component. If some one help that will be appreciable .. thanks


texts:
On the following page:

Customers -> Manage Customers -> Click on a customer

It shows a list of tabs on the left side, one of which is called "Customer View".

But when I look at Mage_Adminhtml_Block_Customer_Edit_Tabs::_beforeToHtml, I see that the function call to addTab() is commented out for the "Customer View" tab.

So where is the Customer View tab being added from?


texts: Sales Order Invoice - save_after event getId() issue

texts:
I need to manipulate invoice items & some other data after the invoice is created, so I've used sales_order_invoice_save_after event.

I know this event is fired more than just when creating the invoice, so most people recommend using other events such as sales_order_invoice_pay, but that's not a problem for my needs.

My surprise has came when debugging why things don't work as expected, and I've found that it seems this event is fired before the invoice is totally saved

For instance, inside the observer...

$invoice->getData() // returns some data, but...
$invoice->getId() // returns nothing ¿¿??

If I look database, there is no record in sales_flat_invoice table

Anybody here has faced the same issue? So, which event could I use to get the invoice object after it is saved?


texts: Magento SOAP, getting simple products associated with configurable products

texts:
I'm importing products from Magento using with the SOAP API V2. Everything is Ok but I get simple products and configurable products as unrelated objects.

How can I get the association between configurable and simple products?

This is NOT repeated. Other questions here are about creating configurable products, not reading.

EDIT:
The problem is to solve that only through Magento built-in API. A third party extension is not an option because that Magento instance is only accessible through API.


texts:
I am having a little issue with my website, it's responsive site, when viewed in smaller screens the checkout icon or search icon shows in 3 lines. I must have done something wrong, can someone point me in the right direction of what file could be causing this.

My website uses magentos latest default theme.


texts:
How to add new rule to rules.js?
I have created extra-rules.js

define(
[
    'jquery',
    'Magento_Ui/js/lib/validation/validator'
], function ($, validator) {
    "use strict";
    return validator.addRule('phoneNO',
        function (value) {
            return value.length > 9 && value.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
        },
        $.mage.__('Please specify a valid phone number')
    );
});

How to merge this rule to rules.js?


texts: Migrate to Magento 2.0 - How can I Ignore the theme

texts:
I am trying to migrate Magento 1.9.1.0 to Magento 2.0 and I dont want to migrate the custom theme that I already having in 1.9.1.0.

Is there a way I can configure to ignore the theme while migrating the data?


texts: Magento: Linking to different store urls

texts:
Magento ver. 1.9.0.1

Current Store Setup:

Website Name: Main Website
Store Name: Main Website Store
Store View Name: English, Indonesia

I'm planning to run adwords on each country.

How do I link to the products of these stores?


texts: How to get the wishlist collection of a customer by Customer Id in magento2

texts:
I am trying to get the wishlist products collection of a particular customer by the customer Id. but it is not working. I am using the following code :

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$wishlist = $objectManager->get('\Magento\Wishlist\Model\Wishlist');
$wishlist_collection = $wishlist->loadByCustomerId($userId, true)->getItemCollection();


texts: Magento 2.2.2 Uncaught Error: Call to undefined method Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend\Interceptor::getResource(

texts:
Magento 2.2.2

I created a Magento 2 shop and I keep getting the mentioned error (full error https://pastebin.com/rfH2R1Aa).

I also cleared the cache, recompiled, redeployed, deleted generated folder.

Nothing helped, the error keeps coming up whenever I try adding a product to the cart and sometimes just randomly.

Any ideas?


texts: Magento: Checkbox is showing unchecked after checked and saved in admin configuration

texts: I created a checkout in system.xml in admin configuration. When I check that checkbox and click on save config, then 1 is storing in core_config_data but checkbox is still unchecked. How to checked ?


texts: How do I add information to existing simple products by CSV?

texts:
My company is trying to add UPC information in bulk to our existing Magento products. We think that scanning our SKU's in a CSV and then scanning the UPC information would be very efficient for us.

Does anyone know how to add this information by SKU with a CSVfile? Or would a script need to be written?


texts:
When I login, the top 'Magento Admin Panel' logo is shown but nothing below it.  There are no JS errors in the console.  When I view source, this is the bottom of the code:

<div class="nav-bar">
<!-- menu start -->

After that the page stops.  Any suggestions on how to fix this?


texts: Translation of product in minicart and checkout - magento 2.x

texts:
I have the following problem with translation of product in minicart and checkout on Magento 2.x:
 When I add product in minicart on one language(for example English) and later, if I change the language to German, the product still is shown in English. Product is added for both store views - English and German. Is there are any way to fix this?


texts: Cannot sort by position in Magento 1.9.2.4

texts:
I am trying to force a category of products to sort by position in Magento 1.9.2.4. I have assigned the position to each product in the category but I notice there is no position option - only by Best Value, Name, and Price (see image below).

Can anyone please advise a fix?


texts: Update custom columns in sales_order_grid / Regenerate sales_order_grid

texts:
I have a custom module that adds an extra column to sales_order which is updated at a point after the order is made.

I have in my upgradeShcema the following code

  $setup->getConnection()->addColumn(
    $setup->getTable('sales_order'),
    'epicor_order_id',
    [
      'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
      'nullable' => false,
      'comment' => 'Epicor Order ID',
    ]
  );
  $setup->getConnection()->addColumn(
    $setup->getTable('sales_order_grid'),
    'epicor_order_id',
    [
      'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
      'nullable' => false,
      'comment' => 'Epicor Order ID',
    ]
  );
}

This works and I can see the two extra columns in the database

Some time after the order is created I am running this code.

    $orderObject = $this->_orderRepository->get($epicorOrder->getOrderId());

    if($orderObject->getId()){
      $orderObject->setEpicorOrderId($epicor_order_id)->save();
    }

I can see this is correctly updating the column in the sales_order table but it is not updating the order in the sales_order_grid table.

I am also getting this column to display in admin view via this file in Vendor/Module/view/adminhtml/ui_component/sales_order_grid.xml

This displays the value I want but the value isn't being updated. If I manually go into the database and change the column I can see the change is visible in the admin view.

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
  <columns name="sales_order_columns">
    <column name="epicor_order_id">
      <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
          <item name="filter" xsi:type="string">text</item>
          <item name="label" xsi:type="string" translate="true">Epicor Order ID</item>
        </item>
      </argument>
    </column>
  </columns>
</listing>

I have checked cron job, reindexed via command line, cleared cache. I also tried fiddling with asynchronous indexing as mentioned in this question Rebuilding sales_order_grid and tried deleting records out of the sales_order_grid table. Even when the table is regenerated the epicor_order_id is not copied across.


texts: What would cause the wrong attributes to display after Magento 2 migation?

texts:
I migrated from Magento 1.9 to 2.1. In my layered navigation almost every attribute shows up for every product. On the item page in the backend there are a bunch of empty attributes, no label or anything. All of the attributes work fine in Magento 1, and I had no issues migrating. How can I fix this?

I figured out that these were attributes such as backorders_leadtime. I don't use them so when I removed them from the attribute set all of these boxes went away. I still haven't figured out why all attributes are showing.


texts: Add breadcrumb to layered navigation pages

texts:
I need to find a way to add breadcrumbs to pages which are created by Layered Navigation, for instance if you'd click on a certain brand name the brand name is missing in the breadcrumbs.

You can test it here, http://www.onyourface.nl/vrouw-zonnebrillen/ and then choose a brandname on the right, so for example Prada: http://www.onyourface.nl/vrouw-zonnebrillen/l/prada

What I tried to do was coming from a different angle, I tried loading a different template for those pages so that I could add the breadcrumbs manually.
I explained that angle here How to create a different template for catalog_category_layered

I thought I was close when I added the following code to the category/list.phtml

$current_category = Mage::registry('current_category')->getUrl();
$category_name = Mage::registry('current_category')->getName();

$catnamemurl = "" . $category_name . "";

foreach ($_productCollection as $_product):

$brandname = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('manufacturer');

endforeach;

//breadcrumb block stuff
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
$breadcrumbs->addCrumb('category', array('label'=>$catnamemurl, 'title'=>$category_name));
$breadcrumbs->addCrumb('manufacturer', array('label'=>$brandname, 'title'=>$brandname));

$breadcrumbblock = $this->getLayout()->getBlock('breadcrumbs')->toHtml();
echo html_entity_decode($breadcrumbblock);

But then, of course, you would see the manual breadcrumbs on the category list as well, but it should only show when someone clicks on a brand name, so that's when I thought maybe if the brand name link would load a different template than the normal category list I would've solved my problem, but I never got that to work.

I would be entirely grateful if someone could help me in the right direction.

Thanks in advance and for taking the time to read this chaotic/messy thread.


texts: I can overwrite a layout in my parent theme, but not in my child theme. What is wrong with this?

texts:
I am fairly new to Magento and I am currently working with version 2.1. I have created two new custom themes, I will call them Base and BaseChild for this example.

Locations
app/design/frontend/Base/default        //Inherits from Luma
app/design/frontend/BaseChild/default   //Inherites from Base

Inside the admin area, I have the base website set to use the BaseChild theme, and I have another site setup that is also using the BaseChild theme.

If I create a template file at BaseChild/default/Magento_Theme/templates/html/absolute_footer.phtml and add content to it, this will override the section on the page properly for the template. However, if I create a layout file at BaseChild/default/Magento_Theme/layout/default.xml and add the following content to it

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="footer-container" remove="true"/>
    </body>
</page>

This does nothing. But if I put this same file in the parent at Base/default/Magento_Theme/layout/default.xml it works and the footer is gone.

Why is my child theme not overriding properly even though the parent theme is.


texts: getCssJsHtml function called twice on catalog page?

texts:
On Magento CE1.6, on the catalog page access (both list and grid), log are generated in system.log :

Notice: Undefined index: items  in .../app/code/core/Mage/Page/Block/Html/Head.php on line 167
Warning: Invalid argument supplied for foreach()  in .../app/code/core/Mage/Page/Block/Html/Head.php on line 167

The function involved here is getCssJsHtml() called in the head.phtml file.

I've put some debug and find head.phtml is called twice, first time with good parameters, all design is loaded as expected, but the second time, without any parameters ($data['items'] is not defined).

I can't find where head.phtml is called the second time and it seems the problem occurs in all of my custom theme.


texts: How to stop minicart remove confirm popup to close on body click in magento2

texts: I want to stop minicart remove content popup to close when body click


texts:
In magento we are updating orders in two tables each time,
what is the real significance to use two tables,

what is the difference between sales_flat_order_grid and sales_flat_order tables ,

why we need to store order details in two tables.


texts: Magento 2: sort values in collection with unique flag

texts:
I have an array as collection and ordered it in ascending order with respect to expiry date as below:

$creditDetails = $this->_creditFactory->create()->addFieldToFilter('customer_id', 1)->setOrder('date_expires', 'asc');

I have some records which do not have any expiry date i.e NULL

I want such records to come in the collection at the end of or after the records which have some expiry date. Now, records without an expiry date are executing first.

How can I do this?


texts: Remove default Magento2 favicons from head

texts:
Magento2 inserts two favicons into the head: <link rel="icon" type="image/x-icon" href="favicon.ico"> and <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">.

Since I will add custom icons by myself in default_head_blocks.xml, I would like to remove the default two. I tried removing them via <remove src="Magento_Theme::favicon.ico" />, but this didn't work. I also tried to override the two icons by adding them to default_head_blocks.xml and using another file, but this didn't work either.


texts: I can see all images in frontend but the images and label are not in admin

texts:
I have Uploaded 20K products by .csv.
Uploaded all images to /media/import/ and put /imagename.jpg in .csv

It works fine in store front.
But Images tab in admin is empty. There's no image and label for any product...

Kindly give me a solution.


texts: Custom Magento Extension Enable and Disable by my custom admin module

texts:
How can i control my Custom Magento Extension from admin panal

What is System.xml ?

To view data and most i want to enable and disable module by my custome admin site

i want my own functionality for this feature.


texts: Don't let core_config_data value change if it is a empty field

texts:
I added some fields to core_config_data through system.xml of my module. as shown below:

        <groups>
            <hot_deals translate="label">
                Hot deals
                <frontend_type>text</frontend_type>
                <sort_order>0</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <deals_category_id translate="label">
                        Deals category id
                        <frontend_type>text</frontend_type>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </deals_category_id>
                </fields>
            </hot_deals>
       </groups>

I want to apply some default value to the above created text field by changing the above system.xml file such that if user tried to empty the field and save then also the text field should hold the default value. In other cases like when the user altered the value, the new value should be store in the table.

Is it possible?

I can do this easily in phtml files by using if else statement but the problem is that there are many phtml files which need this change.


texts: Magento 2.3.4: 500 Internal Server Error while sending email from Admin

texts: When I send email form the magento admin then i can see 500 Internal server error. See attachment. Can you guys help me to resolve this?


texts: Overriding adminhtml of Community module

texts:
I am trying to rewrite a block for a module in the community code pool. The Module that I am trying to rewrite is TBT_Enhancedgrid. The directory structure is

app/code/community/TBT
└── Enhancedgrid
    ├── Block
    │   ├── Catalog
    │   │   ├── Product
    │   │   │   ├── Grid
    │   │   │   │   └── Columns.php
    │   │   │   └── Grid.php
    │   │   └── Product.php
    │   ├── System
    │   │   └── Html.php
    │   └── Widget
    │       ├── Grid
    │       │   ├── Column
    │       │   │   ├── Filter
    │       │   │   │   ├── Category.php
    │       │   │   │   └── Image.php
    │       │   │   └── Renderer
    │       │   │       ├── Action.php
    │       │   │       ├── Category.php
    │       │   │       └── Image.php
    │       │   └── Column.php
    │       └── Loyalty.php
    ├── controllers

app/code/local/Company/TBT/
└── EnhancedGrid
    ├── Block
    │   └── Widget
    │       └── Grid
    │           ├── Column
    │           │   └── Renderer
    │           │       └── Image.php
    │           └── Column.php
    └── etc
        └── config.xml

I am trying to re-write Column.php from the community module. The contents of the config file is

 <?xml version="1.0"?>
 <config>
 <modules>
     <Company_TBT_Enhancedgrid>
         <version>1.3.2.1</version>
     </Company_TBT_Enhancedgrid>
 </modules>
 <global>
     <blocks>
         <adminhtml>
             <rewrite>
<widget_grid_column>Company_TBT_Enhancedgrid_Block_Widget_Grid_Column</widget_grid_column>
            </rewrite>
        </adminhtml>
    </blocks>
</global>
</config>

The contents of the app/etc/module/Company_TBT_Enhancedgrid.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_TBT_Enhancedgrid>
        <active>true</active>
        <codePool>local</codePool>
        <depends>
            <TBT_Enhancedgrid/>
        </depends>
    </Company_TBT_Enhancedgrid>
</modules>

✔

The Column.php file in local pool is

class Company_TBT_Enhancedgrid_Block_Widget_Grid_Column extends TBT_Enhancedgrid_Block_Widget_Grid_Column
{
       /* with contents*/
}

But the function defined in Image.php in local code pool is not being over-ridden. I did read the other related posting before posting this question, but I still can't figure out what am I doing wrong. Any help would be nice. Thanks


texts: Create custom form above grid in magento admin panel

texts:
As per my client requirement, i need to display form above custom grid having 3 input fields and need to perform filter on submit this form.

I have created grid with my custom collection with default magento 1.9 standard


texts:
I have a custom admin module in my magento website. I use a custom form submission.
Here is my module.xml file

<?xml version="1.0"?>
<layout>
  <courses_adminhtml_book_update>
    <update handle="courses_book_update"/>
    <reference name="content">
       <block type="courses/adminhtml_update" name="update" template="courses/update.phtml"/>
    </reference>
  </courses_adminhtml_book_update>
</layout>

and here is my phtml file.

Add Dates

     <form id="edit_form" name="edit_form" method="post" action="<?=$this->getUrl('*/*/update')?>">

            New Date 1
            <input type="text" name="date[]" id="t1" />
            <img src="<?=$this->getSkinUrl('images/grid-cal.gif')?>" alt="" class="v-middle" id="dt1" title="Date selector">

            New Date 2
            <input type="text" name="date[]" id="t2" />	          <img src="<?=$this->getSkinUrl('images/grid-cal.gif')?>" alt="" class="v-middle" id="dt2" title="Date selector">

            New Date 3
            <input type="text" name="date[]" id="t3" />
            <img src="<?=$this->getSkinUrl('images/grid-cal.gif')?>" alt="" class="v-middle" id="dt3" title="Date selector">

      </form>

            <button onclick="editForm.submit()" class="scalable save" type="button">Add Dates</button>

When I submit the form, it redirects to the admin home page (dashboard). What am I doing wrong? Please help me with this.


texts:
I want to refresh only a specific tab in Magento 1.X. For the moment I refresh the entire page with all tabs, but doing so I lose the infos from the other tabs.
What I have is in 1 tab I have 2 blocks, one is a grid where people do actions, and the other block is a simple form that has the summary, I want  the actions on the grid to refresh only the summary + grid in that tab only.


texts: Trying to override _beforeSave method and Magento calling both custom method and core method as well

texts:
All I am trying to override the _beforeSave() method in resource model Mage_Customer_Model_Resource_Customer.

There is no problem in overriding as I can get the call to my custom _beforeSave method in my Custom Class.

Config for my custom Class is:

<?xml version="1.0" encoding="UTF-8"?>

<config>
    <modules>
        <Abc_Customer>
            <version>0.1.0</version>
        </Abc_Customer>
    </modules>

    <global>
        <models>
            <cust>
                <class>Abc_Customer_Model</class>
                <resourceModel>cust_resource</resourceModel>
            </cust>
            <cust_resource>
                <class>Abc_Customer_Model_Resource</class>
            </cust_resource>
            <customer_resource>
                <rewrite>
                    <customer>Abc_Customer_Model_Resource_Customer</customer>
                </rewrite>
            </customer_resource>
        </models>
    </global>

</config>

After that I have created the Abc_Customer_Model_Resource_Customer class, copied the _beforeSave method from the core class and changed according to need.

But the problem is now that magento is calling both of the methods.

How can I stop this behaviour and just let only my custom method to run?

Please suggest.

Thanks


texts: Magento Sales Order view Item ordered block

texts:
I have been trying to give link to download the product image added by user in sales view order's item ordered phtml(currently it shows only product image name). I'm new to magento and have no idea how to do it. But on searching I found the files which prints the item ordered's information which is in

app\design\adminhtml\default\default\template\custom\sales\order\view\items.phtml.

Now I need to add link to product added and I should not be writing code inside core files but by overriding files with my custom files. How to override the core files with my custom files.

Is there any tutorials? I followed this http://sohelrana09.wordpress.com/2011/06/24/how-to-overwrite-sales-view-order-phtml-file-in-magento/

But this didnt affect anything on changing the content inside the custom folder as mentioned in it.

Please help.


texts:
When i click save and send test email it's redirecting to

frontendbaseurl/awfollowupemail_rules/edit/id/16/tab/followupemail_tabs_sendtest/key/f58025911cd3cb18f5d6683ab609c608/

but need to redirect to

adminurl/awfollowupemail_rules/edit/id/16/tab/followupemail_tabs_sendtest/key/f58025911cd3cb18f5d6683ab609c608/

redirect line

$this->_redirect('*/*/edit', array('id' => $model->getId(), 'tab' => $sendTest ? $sendTest : $tab));


texts: Magento1: Payment method "Zero Subtotal Checkout" not working

texts:
I would like to use a coupon code that allows 100% off on a product but the store still ask for a payment method as a Required Fields but the fields are blank. I enabled the Zero Subtotal Checkout at admin but it doesn't seem to work.
Please see the following Screenshot.

Thanks for the help!


texts: Magento2 upgrading to 2.3.3 SQLSTATE[HY000] [2002] Connection refused

texts:
I'm trying to follow the devdoc instructions for a CLI upgrade from 2.3.2 to 2.3.3 but I'm getting this Connection refused error partway through the process.

My app/etc/env.php looks like this...

    'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => '127.0.0.1',
                'dbname' => 'my_database_name',
                'username' => 'my_database_user',
                'password' => 'my_database_password',
                'active' => '1'
            ]
        ]
    ],

I can connect using these credentials mysql -h 127.0.0.1 -u my_database_user -p my_database_name fine.

Running a bin/magento setup:upgrade gives me....

Cache cleared successfully
File system cleanup:
/var/www/html/magento2/generated/code/Amazon
/var/www/html/magento2/generated/code/Composer
/var/www/html/magento2/generated/code/Dotdigitalgroup
/var/www/html/magento2/generated/code/Ebizmarts
/var/www/html/magento2/generated/code/Infortis
/var/www/html/magento2/generated/code/MSP
/var/www/html/magento2/generated/code/Magento
/var/www/html/magento2/generated/code/Migration
/var/www/html/magento2/generated/code/Symfony
/var/www/html/magento2/generated/code/Temando
/var/www/html/magento2/generated/code/Yotpo
The directory '/var/www/html/magento2/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
SQLSTATE[HY000] [2002] Connection refused

I'm really confused by this and how to correct it.

The only other clue I have is that magento.cron.log has lines of the form...

In Abstract.php line 144:

  SQLSTATE[HY000] [2002] Connection refused

In Abstract.php line 128:

  SQLSTATE[HY000] [2002] Connection refused

queue:consumers:start [--max-messages MAX-MESSAGES] [--batch-size BATCH-SIZE] [--area-code AREA-CODE] [--single-thread] [--pid-file-path PID-FILE-PATH] [--] <consumer>

Any ideas?


texts:
I am trying to load the url: http://magento2.dev/index.php/api/v2_soap?wsdl=1 in the browser but gives me 404.

Additionally I using SoapUI Software and gives me error too.

  Error loading [http://magento2.dev/index.php/api/v2_soap?wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 9): '!

Does anyone here have used/use Magento 2 API and possible could give some advice to help me find what I am doing wrong or not doing right, I appreciate.

Thanks in advance.


texts:
I added content using this Instruction

It's Working fine! Content is coming! But i need my custom Content at last! I don't want my custom content in middle of something! How can i align that??

My sales_order_view.xml file is this

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="order_info">
            <block class="Backend\RewriteSales\Block\Adminhtml\Order\View\Custom" name="sales_order_view_custom" template="order/view/custom.phtml" />
        </referenceBlock>
    </body>
</page>


texts: In Magento 2 admin, how to set Custom Layout Option to a default value of ''No Update' value

texts:
I recently did data migration from M1 to M2 with data migration tool. The product when opened in the edit mode from Admin would show "Use Existing" as the default value instead of "No Update" for Cusomt Layout Option under Migration_Default. The products would display only if the Custom Layout Option is No Update. I tried to set the this attribute for all the products using Update Attributes under Action dropdown, but it's not making any difference. Is there way to accomplish this? Please refer the screenshots. When a product gets saved with the custom layout update = No Update under Migration_design, the following tables would lose some records. I am not sure if there should be other table too that would also lose the entries.

catalog_product_entity_datetime - All the entries got deleted.
catalog_product_entity_decimal  - 6 record became 3
catalog_product_entity_int      - 17 records became 13
catalog_product_entity_text     - 7 became 6
catalog_product_entity_varchar  - 54 became 37


texts: delete cart items using rest api magento 2

texts:
I am using API to build  app but I need clear all items in cart but couldn't able find api for deleting cart..
Kindly let me know the API to delete the quote/all items in cart


texts: Magento 2.0 Add custom payment and shipping method on programmatically created order

texts:
I need to create an order programmatically where both the payment method and shipping method will not be coming from the list provided for in Magento.  Is this actually possible?

    $quote->getBillingAddress()->addData($address);
    $quote->getShippingAddress()->addData($shippingAddress);

    $shippingAddress = $quote->getShippingAddress();

    $shippingAddress->setCollectShippingRates(true)
                    ->collectShippingRates()
                    ->setShippingMethod('freeshipping_freeshipping'); //shipping method
    $quote->setPaymentMethod('checkmo');
    $quote->setInventoryProcessed(true);
    $quote->save();

    $quote->getPayment()->importData(['method' => 'checkmo']);

    $quote->collectTotals()->save();

I am tasked with having to create a plugin that "imports" the orders from a non Magento website (just like eBay) and then saving them as Magento orders.  Since the non magento website have their own payment method and the fact that the orders has already been paid for in the other site, I just need to reflect on the Magento order the payment of the details and how much the shippment amount is, instead of recomputing them.  Is this actually possible?


texts: Magento 2 make new method available in list.phtml

texts:
If I need to create a method under Magento\Catalog\Test\Block\Product\ListProduct  Class

This class has methods such as:
getProductItem,getProductNames,getProductsCount,getSortByValues

I Would like to make myOwnMethod in my custom module without overwriting it the class ListProduct and use in:

.../app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/list.phtml


texts: What is quote_preview table used for in Magento 2

texts: I was checking the quote tables in Database and stumbled upon quote_preview table, anyone have idea what it is used for ?


texts: Custom Attribute Not saved in Checkout Register Form - Magento

texts:
I need to add two fields for Customer in customer's registration. I managed to do it and its working fine for customer registration. But it is not getting saved in case of onepage checkout (if customer is trying to register himself at the time of checkout).

Below is my Code

Code for app\code\local\ComName\ModuleName\etc\config.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <ComName_ModuleName>
      <version>0.1.0</version>
    </ComName_ModuleName>
  </modules>
  <global>
    <helpers>
      <modulename>
        <class>ComName_ModuleName_Helper</class>
      </modulename>
    </helpers>
    <models>
      <modulename>
        <class>ComName_ModuleName_Model</class>
        <resourceModel>modulename_mysql4</resourceModel>
      </modulename>
    </models>
    <resources>
      <customerattribute1417600661_setup>
        <setup>
          <module>ComName_ModuleName</module>
          <class>Mage_Customer_Model_Entity_Setup</class>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </customerattribute1417600661_setup>
      <customerattribute1417600661_write>
        <connection>
          <use>core_write</use>
        </connection>
      </customerattribute1417600661_write>
      <customerattribute1417600661_read>
        <connection>
          <use>core_read</use>
        </connection>
      </customerattribute1417600661_read>
    </resources>
  </global>
</config>

Code for app\code\local\ComName\ModuleName\Helper\Data.php:

class ComName_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
{

}

Code for app\code\local\ComName\ModuleName\sql\customerattribute1417600661_setup\mysql4-install-0.1.0.php:

$installer = $this;
$installer->startSetup();
$installer->addAttribute("customer", "dri_license",  array(
    "type"     => "varchar",
    "backend"  => "",
    "label"    => "Driving License",
    "input"    => "text",
    "source"   => "",
    "visible"  => true,
    "required" => false,
    "default" => "",
    "frontend" => "",
    "unique"     => false,
    "note"       => ""
    ));
        $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "dri_license");
$used_in_forms=array();
$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", 100)
        ;
        $attribute->save();
$installer->endSetup();

I have added fields in billing.phtml

Please help me if anyone have any idea on what i missing


texts: when I installing magento2 the following error will have occurred please anyone can answer the following question


texts: File is not being uploaded from front end

texts:
I am trying to upload a file from frontend. as bellow,

.phtml file

<label for="sb_link">Image</label>
<input type="file" id="bs_image" name="bs_image" required="true"/>

and in my controller I am doing

      if (isset($_FILES['bs_image']['name']) && $_FILES['bs_image']['name'] != '') {
                $path = Mage::getBaseDir() . '/test';
                if (!file_exists($path)) {
                    mkdir($path, 777, true);
                } try {

                    $fname = $_FILES['bs_image']['name'];
//                 $fname = $this->getRequest()->getParam('bs_image');
                    $uploader = new Varien_File_Uploader('bs_image');
                    $uploader->setAllowedExtensions(array('png', 'gif', 'jpeg', 'docx'));
                    $uploader->setAllowCreateFolders(true);
                    $uploader->setAllowRenameFiles(false);
                    $uploader->setFilesDispersion(false);
                    $uploader->save($path, $fname);
                } catch (Exception $e) {
                    echo 'Error Message: ' . $e->getMessage();
                }
            }

folder is present, and getting no error/exception, but file is not in folder. or there is an other way to do it. I was following Owais Kiani's
post


texts: Retrieve custom variable in custom module

texts:
I have a custom module that initiates on sales_order_invoice_register.

    <events>
        <sales_order_invoice_register>
            <observers>
                <make_sap>
                    <type>singleton</type>
                    <class>make_sap/observer</class>
                    <method>orderExport</method>
                </make_sap>
            </observers>
        </sales_order_invoice_register>
    </events>

In my Observer.php I want to retrieve the value of a custom variable from Magento:

class Make_Sap_Model_Observer {

private $_wsdlUrl           =   Mage::getModel('core/variable')->loadByCode('jgc_wsdlUrl')->getValue('text');
private $_user          =   Mage::getModel('core/variable')->loadByCode('jgc_wsdlUser')->getValue('text');
private $_pass          =   Mage::getModel('core/variable')->loadByCode('jgc_wsdlUser')->getValue('text');

With this, I get a server error


texts: Magento 2: How can i reload section payment Method in checkout page?

texts:
how can i reload Payment Method section in checkout page?
I create a custom discount. when i set custom discount and apply, i need reload total section and payment section. I use this code:

var deferred = $.Deferred();
getTotalsAction([], deferred);
getPaymentInformationAction(deferred);

$.when(deferred).done(function () {
    paymentService.setPaymentMethods(
        paymentMethodList()
    );
});

i set custom discount and grand total = 0, but just only total section reload again and show correct, payment method is not reload and not show "no payment required", its still show another payment. ? Can Anyone help me? Or Am I missing something?
Thanks In advance.


texts: Magento 1.9.3 magento Mage registry key "_singleton/customer/session" already exists

texts:
I am trying to find out solution for issue "Mage registry key "_singleton/customer/session" already exists".
I am trying to many thing but still not success.
I am write my error report here if any one know solution and how can i debug my issue please post your answer.


texts:
I need to add two custom fields in group price both in simple product and in bundle.

app/design/adminhtml/default/default/template/catalog/product/edit/price/group.phtml

Actually I want to calculate Profit and Profit percentage,
for example

   Price:  144.00
   Profit: 20.00
   Profit Percentage: 13.89

I successfully add both in first row as wholesale... but when I add next field it's not working and repeating itself. Would anybody guide me in the right direction?

<?php foreach ($this->getValues() as $_item):

$getCost  = $_product->getCost();
$groupprofit = $_item['price'] / 1.2 - $getCost;
$grouppercentage = $groupprofit / sprintf('%.2f', $_item['price']) * 100;
?>
<?php endforeach; ?>

var groupPriceRowTemplate = '
'
+ '<td<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>'
+ '<select class="<?php echo $_htmlClass; ?> required-entry" name="<?php echo $_htmlName; ?>[{{index}}][website_id]" id="group_price_row_{{index}}_website">'
<?php foreach ($this->getWebsites() as $_websiteId => $_info) : ?>
+ '<option value="<?php echo $_websiteId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_info['name'])); ?><?php if (!empty($_info['currency'])) : ?> [<?php echo $this->escapeHtml($_info['currency']); ?>]<?php endif; ?></option>'
<?php endforeach; ?>
+ '</select>	'
+ '<select class="<?php echo $_htmlClass; ?> custgroup required-entry" name="<?php echo $_htmlName; ?>[{{index}}][cust_group]" id="group_price_row_{{index}}_cust_group">'
<?php foreach ($this->getCustomerGroups() as $_groupId => $_groupName): ?>
+ '<option value="<?php echo $_groupId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_groupName)); ?></option>'
<?php endforeach; ?>
+ '</select>	'
+ '<input class="<?php echo $_htmlClass; ?> required-entry <?php echo $_priceValueValidation; ?>" type="text" name="<?php echo $_htmlName; ?>[{{index}}][price]" value="{{price}}" id="group_price_row_{{index}}_price" />	'

+ '<?php echo  sprintf('%.2f', $groupprofit);  ?>	'
+ '<?php echo  sprintf('%.2f', $grouppercentage); ?> 	'

+ '<input type="hidden" name="<?php echo $_htmlName; ?>[{{index}}][delete]" class="delete" value="" id="group_price_row_{{index}}_delete" />'
+ '<button title="<?php echo Mage::helper('catalog')->__('Delete Group Price'); ?>" type="button" class="scalable delete icon-btn delete-product-option" id="group_price_row_{{index}}_delete_button" onclick="return groupPriceControl.deleteItem(event);">'
+ '<?php echo Mage::helper('catalog')->__('Delete'); ?></button>	'
+ '
';


texts: Import Products into Store View 3 but Images missing off Site

texts:
We have a created a CSV to import all products into Store View 3. with all the image columns,

image,image_label,thumbnail,thumbnail_label,small_image,small_image_label

the CSV contains other fields including SKU. The file imports fine into Store View 3. The images looks ok too.

However under the Default View - the images are uploaded but not selected? If I go into Store View 3, then the images are there and ticked.

As such, these images do not appear on the site.

How do I fix this on the CSV?

I have gone through the various posts on Stack and Google.

I hope someone is able to help me

Thanks


texts: how to check admin config before overriding a block?

texts:
i have custom module

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Sample_Menus" setup_version="2.0.0"/>
</config>

after i
Creating di.xml to refer the overriding block class

 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Theme\Block\Html\Topmenu" type="Sample\Menus\Block\Html\Topmenu" />
</config>

so how to check if in config is Enable then overriding block Magento\Theme\Block\Html\Topmenu else is disable not overriding?

I tried

 protected function _toHtml()
    {
        $this->setModuleName($this->extractModuleName('\Magento\Theme\Block\Html\Topmenu'));
        // check Mageaddons_Menus is acitve
        if($this->getActive() === '1'){
            $this->setTemplate('Sample_Menus::html/topmenu.phtml');
        }
        return parent::_toHtml();
    }

    /**
     * Check if enabled
     *
     * @return string
     */
    public function getActive() {
      return $this->_scopeConfig->getValue('menus/menus/enabled', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
    }

but when set config not endable. it not render teample of \Magento\Theme\Block\Html\Topmenu
any idea can help. thanks


texts: Magento 2.0 - Display custom attribute on product listing page

texts:
Default catalog_product_prices.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <block class="Magento\Framework\Pricing\Render\RendererPool" name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="default_render_class" xsi:type="string">Magento\Catalog\Pricing\Render\PriceBox</item>
                <item name="default_render_template" xsi:type="string">Magento_Catalog::product/price/default.phtml</item>
                <item name="default_amount_render_class" xsi:type="string">Magento\Framework\Pricing\Render\Amount</item>
                <item name="default_amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                <item name="prices" xsi:type="array">
                    <item name="special_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/special_price.phtml</item>
                    </item>
                    <item name="tier_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/tier_prices.phtml</item>
                    </item>
                    <item name="final_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\FinalPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/final_price.phtml</item>
                    </item>
                    <item name="custom_option_price" xsi:type="array">
                        <item name="amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                    </item>
                    <item name="configured_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\ConfiguredPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/configured_price.phtml</item>
                    </item>
                </item>
                <!--<item name="adjustments" xsi:type="array"></item>-->
            </argument>
        </arguments>
    </block>
</layout>

My catalog_product_prices.xml to display attribute below product price and above Add to Cart button.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="render.product.prices">
            <block class="Reward\Points\Block\Points" name="reward_points" template="points.phtml" />
        </referenceBlock>
    </body>
</page>

Reward\Points\Block\Points

<?php
namespace Reward\Points\Block;

class Points extends \Magento\Framework\View\Element\Template
{
    public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
}

I tried with above code, but its not working. How do I display custom attribute value in product listing page ?


texts: Authorize.net showing Sorry, but something went wrong. Please contact the seller.

texts:
I am using the sandbox account of authorize.net. I have set the test mode to false in both admin and on sandbox.

Is this error occurring because i am on local server? My Url starts as http.


texts:
I would like to know how to find the block type of some page example : the home page.

I have a problem in my homepage, I want to display some block, in the xml I declared my block in <cms_index_index> (local.xml) but if I put it in the <reference name="head"> it appears, if <reference name="content"> or <reference name="content"> it does not work . It seems to me that the type of block is not good.

xml:

<cms_index_index>
        <reference name="root">
            <block type="core/template" name="seconnecter_test" template="customer/form/test-seconnecter.phtml"/>
        </reference>
</cms_index_index>

in the homepage 1column-full.phtml i called it like this:

<?php echo $this->getChildHtml('seconnecter_test');?>

i have tested to add output="toHtml", it works but it displays me the block at the bottom of a footer, i want to display it in the place where i called getChildHtml.


texts: Magento 1.9 set default for radio button custom option

texts:
How do i set my radio button custom option to a default value? Now nothing is selected by default.

I suspect I can add or change something in -->

Mage/Catalog/Block/Product/View/Options/Type/Select.php?


texts: EMERGENCY - unable to login to Admin panel; also - no users listed in database

texts:
Magento 1.9.1
Porto theme

I have had a problem twice before where I could not log into the Magento Admin panel with my user name and password. I had to use code in the mySQL to change the password for my Admin user account.

This actually started a couple of hours ago. We have 3 Active accounts:

1 (mine) with the Admin privileges
and
2 with a specific defined User roles.

The 2 accounts with specific defined User roles lost access first; then I went to the User's area in the Admin panel and found that those 2 accounts were set to DISABLED instead of Enabled. I created a new user account so that I could give it to the other 2 people but shortly after I did that - I was logged off from the Admin panel and was never able to log back in. The new user account I created does NOT work either.

I tried to run the following command in the SQL tab of the correct database via mySQL:

  UPDATE mg_admin_user SET password = md5('test'), is_active = 1 WHERE
  username = 'Allysin'

but it just says that it took something like 0.003 seconds and there were no rows to update.

The interesting things is that when I open up the rows of the database and look at:

mg_admin_role

It actually has all the roles I defined before in it!

But when I open up the 'mg_admin_user' --) it is empty.

What do you think happened? Did somebody hack us and deleted all the user accounts?

How can I fix it? Is there a way to add a user account back into the database? Or is there something else I'm missing?


texts: Magento 2.2.5: How to make javascript code run before phtml code

texts:
I am looking for some solution to make javascript run before phtml code.

My work is sends width and height of my screen to controller, and it will send back to phtml file(because we cant check width and height with php code, we have to do it in javascript code).

But for some reason, the ajax is called after phtml code.
So it makes an issue because the data was not sended from ajax.
Here is my phtml file

  C:\xampp\htdocs\magento\app\code\Aht\BannerSlider\view\frontend\templates\index.phtml

<?php /** @var Aht\BannerSlider\Block\Frontend\Index $block */ ?>

    <?php
        if($block->checkAllowedPage()):
            foreach($block->checkAllowedPage() as $rowsBannerPage):
                $banner_id = $rowsBannerPage['banner_id'];
                if(!empty($block->getBannerSlideById($banner_id))):
    ?>

            <?php
                foreach($block->getBannerSlideById($banner_id) as $rowsBannerSlide):
            ?>
                    <?php
                        $slide = $block->getSlideById($rowsBannerSlide['slide_id']);

                        // resize img
                        $image = $this->helper('Aht\BannerSlider\Helper\Image');

                        $block->getResolutionScreen();
                        $resolition_screen = $image->getResolutionScreen();
                        $width = $resolition_screen[0];
                        $height = $resolition_screen[1];
                    ?>

<img src="<?php echo $image->resize($slide->getImage(), $width, $height); ?>" style="width: 100%; height: auto;">

            <?php
                endforeach;
            ?>

    <?php endif; ?>

    <?php
        endforeach;
    ?>

    <?php
        endif;
    ?>

It return issue with $width and $height because it return null.

Okay so if you need more information or code to check.


texts: Section reload not working on specific REST request

texts:
I have created my custom section which reloads when cart data are updated.
For this I have created sections.xml file with below code.

<action name="rest/*/V1/carts/*/payment-information">

</action>
<action name="rest/*/V1/carts/*/shipping-information">

</action>
<action name="rest/*/V1/carts/*/totals-information">

</action>

Here, my section gets successfully updated when first two requests are executed. rest/*/V1/carts/*/payment-information and rest/*/V1/carts/*/shipping-information
But its not refreshing my section data on last request which is rest/*/V1/carts/*/totals-information

I have checked that when rest/*/V1/carts/*/payment-information and rest/*/V1/carts/*/shipping-information is called, there is a call to reload section data but when rest/*/V1/carts/*/totals-information is called, there is no section reload request.

How can I fire a section reload request on rest/*/V1/carts/*/totals-information request.?


texts: How to Manage API Authentication Lifecycle on Mobile Devices? Magento2

texts:
Every hour regeneration of token and after that login again every hour
  is not logical for Mobile Application.

  Then how Magento manages user login data and authentication in Mobile
  application, if it is developed API As per Service Contracts

How long should I allow my access tokens to exist before
expiring them in Mobile Application?
I don’t want to force my users to re-authenticate every hour in Mobile Application.
how to properly manage your OAuth2 API token life-cycle for Mobile Application.

Making changes in Access Token Lifetime hours would not be logical solution, Because Application and web should have different lifetime hours of Token


texts: Disable Product vs. Remove Product From Website

texts:
I want to enable/disable products for specific websites. I see two ways of doing it:

Enable/Disable the product under the respective website (change the attribute status).
Remove the product from the respective website (tab Websites on the product edit page).

I think both options should do exactly the same. Is there any behavioural difference between the two?


texts:
My site has an admin panel located at http://domain.com/admin

When trying to log in I get the following error in the exception log:

[2020-06-10 20:08:13] main.CRITICAL: The stream or file "/var/www/html//var/log/system.log" could not be opened: failed to open stream: Permission denied {"exception":"[object] (UnexpectedValueException(code: 0): The stream or file \"/var/www/html//var/log/system.log\" could not be opened: failed to open stream: Permission denied at /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108)"} []

I have changed the permissions to 775 on that file, but I am still getting the error.