texts: % OFF all items in category x & Cart Subtotal must be = or less than $

texts:
I am trying to add a rule to my shopping cart for the following.  Purchase $1000 or less of one or multiple items in Category 202 to receive a 10% discount.  I can only get this rule to work if I use "ANY" instead of "ALL".  The problem with this is if someone adds an item in their cart outside of Category 202, they still receive the discount on that item and that item contributes to the $ amount (which triggers the rule (valid for rule 2&3).  I want to apply the following rules:

Purchase items in Category 202 up to $1000 get 10%
Purchase items in Category 202 over $1000 and under $5000 get 20%
Purchase items in Category 202 over $5000 get 30%

Is anyone able to tell me why this only works with "ANY" or am I doing something wrong here?

Really appreciate your help :-)


texts:
How can I disable the required VAT field in billing step and registration with Magento 1.9?
Thanks


texts: I am looking for an automated method of producing 301 redirects after a category change. I have a client who is consistently moving his categories and does not want to manually input redirects in URL management.


texts: How to get the attribute id by attribute code in magento 2

texts: I have the attribute code, But how do I check whether the attribute is exist in the attribute set or not. Please provide me a solution how to get the attribute id from attribute code in magento 2


texts:
im new to magento, i just created a new admin user with limited roles, like: manage products, etc.
i want this user can add, delete and update his own products, i dont want this user to show anybody's products that others added through admin panel.
here is my screen shot of products that other users have added but not this user. i wanna show only his products not others.


texts:
ISSUE - M1 & M2 - Incorrect FedEx Rates (Out-of-Area Costly Surcharges Excluded)

Generate a FedEx rate within the Magento shopping cart in either version 1.9.x or 2.x for New Zealand post code 7482. Then generate a rate within FedEx shipping software for the Pegasus Bay Winery at
263 Stockgrove Road, RD2
Amberley, Canterbury 7482
New Zealand

You will find the Out-of-Area (remote) surcharge of more than $40 is completely left out of the rate assessed in M1 and M2. After spending more than an hour on the phone with FedEx today, it appears Magento does not query for an update using the full address once entered into the cart. By querying only the post code, this FedEx rate is not properly assessed.

Also, for some reason, Magento uses WSDL version 10 for FedEx queries rather than the current version 24. Why?

Is there a solution to this or is this cause to report a bug?


texts:
I would like to override Mage_Catalog_Block_Widget_Link
I've created new module, added some code to config.xml but it doesn't work.
There is my code:
config.xml

<config>
<modules>
    <Module_Base>
        <version>0.0.1</version>
    </Module_Base>
</modules>
<global>
    <helpers>
        <module_base>
            <class>Module_Base_Helper</class>
        </module_base>
    </helpers>
    <blocks>
        <module_base>
            <class>Module_Base_Block</class>
        </module_base>
        <catalog>
            <rewrite>
                <widget_link>Module_Base_Block_Rewrite_Widget_Link</widget_link>
            </rewrite>
        </catalog>
    </blocks>
    ...
 </global>
 </config>

My module folders structure are Module/Base/Block/Rewrite/Widget/Link.php
I've created Link.php as well

class Module_Base_Block_Rewrite_Widget_Link extends Mage_Catalog_Block_Widget_Link
{
  /**
   * Rewrite widget links to rid of store id in url
   *
   * @return string|false
   */
  public function getHref(){
  /* Some code inside */
  }

Where I did mistake?


texts:
Can you please help me on setting stock programmatically for already existing product.
I have a Magento 2.3.5-p1 instance, so StockRegistryInterface, StockItemInterface, setStockData method of productRepository and some other methods which were used for product stock management, are deprecated now. So if you have a solution or any suggestions, please help me. Thanks!


texts: Magento 2 permission issue for cache folder

texts:
Everytime I install a new module on my Magento 2, I got an error that the cache cannot be created because of the permission. All what I need to do is to run the following command to fix it.

   chmod -R 777 var/

What should I do to fix this permission issue without running the command chmod everytime when a new module is installed?


texts: Magento 2: Get Product Attribute’s Select Option Id as Per Option Value For Configurable Product

texts:
I have fetched options attribute value as

<?php $packaging = $_product->getResource()->getAttribute('packaging')->getFrontend()->getValue($_product);?>

I am getting options value, I am trying to fetch option id as per value.
I tried but its not working

if ($packaging->usesSource()) {$option_id = $packaging->getSource()->getOptionId($packaging); }


texts: Prefill checkout values through Javascript (Tealium or AB testing tool)

texts:
I'm trying to figure out how to prefill some data in the checkout form through Tealium or another JS script injection solution (ex: for AB testing).

I have for example the following field:

<input class="input-text" type="text" data-bind="
value: value,
valueUpdate: 'blur',
hasFocus: focused,
attr: {
    name: inputName,
    placeholder: placeholder,
    'aria-describedby': getDescriptionId(),
    'aria-required': required,
    'aria-invalid': error() ? true : 'false',
    id: uid,
    disabled: disabled,
    maxlength: maxlength
}" name="telephone" placeholder="____/__ __ __" aria-required="true" aria-invalid="false" id="G1J60V0" maxlength="13">

If I fill it with the following code:

document.getElementsByName('telephone')[0].value= whatever_value;

I can see the value filled in but the form has not detected a value in the field and when I submitted the form, it highlight this field as if it was empty.

I have tried to simulate a click:

document.getElementsByName('telephone')[0].focus();
document.getElementsByName('telephone')[0].select();
document.getElementsByName('telephone')[0].click();

but it doesn't help either.

How could I update fields from the checkout with prefilled value and ensure they are taken into account by the usual verifications done on the page?

Thanks
Laurent


texts: How to remove modal.js and its related files

texts:
I need to remove modal.js and it's related files all over the website. It is available in vendor directory and I need to remove it from DOM.

I found similar question, but no one answered it:
How to remove modal.js from all pages in magento 2.2

I have also tried remove tag and add modal related js file names in it but it didn't work for me


texts:
How to set an active class to magento2.1 wish-list button on list page? I mean that, when i go to product page, if marked that product to my wish-list before, just shows already added to wish-list or change the color of the button.
I used below code on the product page and its ok but not works on the category page

    <?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var \Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist $block */
?>
<?php if ($block->isWishListAllowed()) : ?>
    <?php $_product = $block->getProduct(); ?>
    <?php $isAdded = $this->helper('Magento\Wishlist\Helper\Data')->getWishlistItemCollection()->addFieldToFilter('product_id', $_product->getId())->count(); ?>
    <?php if($isAdded): ?>
        <?= $block->escapeHtml(__('Added to Wish List')) ?>
    <?php else: ?>
        <a href="#" class="action towishlist" data-post='<?= /* @noEscape */ $block->getWishlistParams() ?>' data-action="add-to-wishlist"><?= $block->escapeHtml(__('Add to Wish List')) ?>
    <?php endif; ?>
<?php endif; ?>


texts:
on http://reddottactical.com/

When you search for any product you get one result (not always related to search term) and then:

  Fatal error: Call to a member function getSortedChildren() on a
  non-object in
  /home/magecenterfi/public_html/app/design/frontend/rwd/default/template/catalog/product/list.phtml
  on line 134

I have tried the solution that is the fix for this error on the home page, but it did not work.

In desperate need of assistance on this error.


texts: How to display rating star in product list page magento2?

texts: I want to display rating star in my product list page, by default Magento if someone gives the rating then show the rating star in the product list page but I want rating star even if someone is not given the rating for the product if someone is not given the rating for the product then the star will be shown empty in Magento 2?


texts: Magento 2 admin catalog category page isn't redirecting properly

texts:
I'm migrating a website from Magento 1.9.0.1 to 2.2, I've only migrated data, that's all I need, the migration completed sucessfully, all the products, customers, orders, categories are there, all pages of the admin section are working fine but the Category one, it has a redirect loop apparently.

I've looked into core_config_data both base url are pointing to http://127.0.0.1/magento/ and web/secure/use_in_adminhtml is set to 0.

Already cleaned the cache and reindexed everything.

This answer said to check web/cookie/cookie_domain my core_config_data didn't have this path, so I tried adding it, but no joy.

I've migrated two different shops from 1.9.0.1 to 2.2 and had the exact same problem.


texts: If I will Pay for Magento 2 Professional Developer Certification Exam to Magento Then Magento will Provide me Study Materials?

texts:
I want to take to the exam of the Magento 2 Professional Developer Certification.
I am Finding Study Materials for Preparing Exam. Magento Take Fee $260 for Exam and Certificat. I have one Question that they will Provide me any video tutorials or any Special books for Preparing Exam and Easy way to understand the flow and structure of Magento.


texts: How to install a free theme on Magento 2.2.5 on XAMPP local host

texts:
I have installed the latest version of Magento2.2.5 without sample data using XAMPP. Now I am trying to install a free third party theme from Venus themes.

I have copied the app folder from the free theme folder and pasted it into root folder of my Megento2.2.5.
Then I tried to run the shell command for upgrade.

But still I am not able to find & select the theme from the admin panel of Magento.


texts:
using the template hints feature I noticed that the template used to render the price of each product in the wishlist is

"template/catalog/product/price.phtml".

I would like to change this path to use a custom phtml template, only for the wishlist page, but I can't find the place where it can be changed.

Anyone has suggestions?


texts: Magento 2.3.4 - Server temp folder gets full because of SQL queries

texts:
I am using Magento 2.3.4, and the server temp folder gets full because of SQL queries. I am looking for someone who can optimize SQL server and queries from Magento 2. The below error appears when the site crashes.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SQLSTATE[HY000]: General error: 1021 Disk full (/dev/shm/#sql_2e1b28_7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device"), query was: SELECT main_table.* FROM eav_attribute AS main_table
INNER JOIN eav_entity_type AS entity_type ON main_table.entity_type_id = entity_type.entity_type_id
LEFT JOIN eav_entity_attribute ON main_table.attribute_id = eav_entity_attribute.attribute_id
INNER JOIN catalog_eav_attribute AS additional_table ON main_table.attribute_id = additional_table.attribute_id WHERE (entity_type_code = 'catalog_product') AND ((additional_table.is_used_in_grid = 1)) GROUP BY main_table.attribute_id
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can someone help me


texts:
Is it worth setting up a firewall for my site?

Do you have any recommendation of a good firewall to use?


texts: How to change products per page based on media query value

texts:
I was wondering if their is a way to change the amount of products are shown on a page based on the media query? So say on mobile you could state that you only want one product, but on desktop you still want 18.

Thanks


texts: how to get number of orders made per customer in admin order grid

texts:
I am trying to display number of orders made per customer (customer is identified by email) in admin order grid. Number of orders should be the sum of orders made per customer, regardless if customer is buying as a quest, or registered user.
expected result should be like
increment_id count_orders email
1000001      1            customer@customer.com
1000008      2            customer@customer.com
1000015      3            customer@customer.com

not like this
increment_id count_orders email
1000001      3            customer@customer.com
1000008      3            customer@customer.com
1000015      3            customer@customer.com

What is the best approach to achieve this ?
Thank you!


texts: Reindexing issue due to weee product attribute created via program

texts:
Due to the newly created attribute(via program) of the type "weee", getting an error in reindexing.

Catalog Search indexer process unknown error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.custom_attr_weee' in 'field list', query was: SELECT `e`.`entity_id`, `e`.`type_id`, `e`.`custom_attr_weee`, `e`.`sku` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_website` AS `website` ON website.product_id = e.entity_id AND website.website_id = 1
 INNER JOIN `catalog_product_entity_int` AS `visibility_default` ON visibility_default.entity_id= e.entity_id AND visibility_default.attribute_id = '99' AND visibility_default.store_id = 0
 LEFT JOIN `catalog_product_entity_int` AS `visibility_store` ON visibility_store.entity_id= e.entity_id AND visibility_store.attribute_id = '99' AND visibility_store.store_id = 1
 INNER JOIN `catalog_product_entity_int` AS `status_default` ON status_default.entity_id= e.entity_id AND status_default.attribute_id = '97' AND status_default.store_id = 0
 LEFT JOIN `catalog_product_entity_int` AS `status_store` ON status_store.entity_id= e.entity_id AND status_store.attribute_id = '97' AND status_store.store_id = 1 WHERE (IF(visibility_store.value_id > 0, visibility_store.value, visibility_default.value) IN (3, 2, 4)) AND (IF(status_store.value_id > 0, status_store.value, status_default.value) IN (1)) AND (e.entity_id > 0) AND (e.entity_id

If we create this attribute via the admin panel, everything works fine. What might be the issue? Help me to resolve it.


texts:
I have 2 modules that rewrite the customer account navigation block:

<blocks>
    <customer>
         <rewrite>
              <account_navigation>ModuleA_Block_Navigation</account_navigation>
         </rewrite>
    </customer>
</blocks>

and

<blocks>
  <moduleB>
      <class>ModuleB_Block</class>
  </moduleB>
   <customer>
     <rewrite>
      <account_navigation>ModuleB_Block_Customer_Account_Navigation</account_navigation>
     </rewrite>
   </customer>
</blocks>

And I need to make ModuleA dependent on ModuleB. But I don't really get the logic of the rewrite configuration in this case...

Both classes extend the core class:

class ModuleA_Block_Navigation extends Mage_Customer_Block_Account_Navigation

and

class ModuleB_Block_Customer_Account_Navigation extends Mage_Customer_Block_Account_Navigation

and each has one function, which is with the same name: removeLink() but in ModuleA it is without arguments, and in ModuleB it has 1 argument: removeLink($var).


texts:
I configured Fedex in backend correctly it's in production mode.But it throws error like below,

This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.


texts: Magento 2: javascript elements load slowly

texts:
Checkout forms, gallery on product pages, and more elements loaded by javascript take up to 4 seconds to load.

What can be done to make javascript elements load faster?

Update:

I'm using a custom theme which inherits from Blank theme. I've not added additional JS files, only made minor changes to them for translation purposes.
All caches are enabled.
It is a live site in production mode.

Pages loading times:

Category and product pages: 5 to 6 seconds.
Cart and checkout: 9 to 10 seconds. (is it normal?)

On product pages, product images are the last to load. This can be annoying for the user. Is it possible to make them load faster / before other elements on the page?


texts: How to get all option of atrributes color whose id is 92?

texts:
How to get all option of attributes in magento, ?
I want to get all options of color attribute.

 $swatches = Mage::getStoreConfig('configswatches/general/swatch_attributes');

    echo "<pre>";print_R($swatches); die;

    output: 92,223,81,221,180

I got color attribute id = 92.. but how to load this id to get all options of color attributes.?


texts: Creating a redeemption form that verifies coupon code and adds it to cart

texts:
I'm pre-generating coupon codes to be distributed to 3rd party promotional sites (such as Living Social). They will sell these coupon codes (which we will call voucher codes) at a discount or in bulk. The customer receives the coupon and comes to my site to redeem. Instead of going to the main page, there is a page setup specifically for redemption. A static form outside of Magento that I ultimately want to have verify the voucher and then send them to a shopping cart that has the item loaded and ready for checking.

I've figured out how to pass coupon data from the redemption form to Magento's shopping cart: www.website.com/&coupon=voucher2014

I would like to tap into Magento's database from that static page if possible. I was thinking when the user inputs their code and hits submit that it first checks Magento's database THEN proceeds to a populated checkout with the matching voucher/item. I believe you need to tap into Mage_SalesRule_Model_Coupon and the Mage_SalesRule_Model_Mysql4_Coupon model in order to query the Magento DB outside of Magento. Does anyone have a better method on how to query that model/db? Thanks.


texts: How to pass a json data from Observer to phtml

texts:
Upon Login, I am sending an API call(post request) to an external site in observer which return a JSON response. I need to populate a table in the phtml with the response received.

Hence I am trying to pass this JSON data from the observer into phtml, Could anyone tell me how to do it, any other method of doing this is also welcome.

Thanking you in advance.

observer code

<?php

namespace Vendor\Module\Observer\Customer;

use \Psr\Log\LoggerInterface;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
class Authenticated implements ObserverInterface
{
  protected $_responseFactory;
protected $_url;
protected $email;

protected $_coreSession;

public function __construct(

    \Magento\Framework\App\ResponseFactory $responseFactory,
    \Magento\Framework\UrlInterface $url,
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Framework\Session\SessionManagerInterface $coreSession

) {
_responseFactory = $responseFactory;
$this->_url = $url;
// $this->customerSession = $customerSession;
$this->_coreSession = $coreSession;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
//get object method

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customer = $observer->getEvent()->getCustomer();

$event = $observer->getEvent();
$customer = $event->getCustomer();

$email=$customer->getEmail();

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_PORT => "53252",
CURLOPT_URL => "http://localhost:53252/api/Account/Login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\t\"Email\":\"$email\",\n\t\"Password\":\"$email\"\n}",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json",
"postman-token: f2d5833b-07f0-9ecc-ca24-94dd9fc58a66"
),
));

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

curl_close($curl);
$json = json_decode($response, true);
//$this->customerSession->setMyValue($json);
//$this->customerSession->getMyValue();
$this->_coreSession->start();
$this->_coreSession->setMessage('The Core session');
if ($err) {
echo "cURL Error #:" . $err;
} else {

//echo $response;
if($json['Response']!='FOUND'){
$customerBeforeAuthUrl = $this->_url->getUrl('test/page/view');
$this->_responseFactory->create()->setRedirect($customerBeforeAuthUrl)->sendResponse();
}
else {
return $this;
}
}
exit;
}
//$redirectionUrl = $this->url->getUrl('[test]/[page]/[[view]');
//$this->responseFactory->create()->setRedirect($redirectionUrl)->sendResponse();

//return $this;

}

controller code

_pageFactory = $pageFactory;
        return parent::__construct($context);
    }

    public function execute()
    {
        return $this->_pageFactory->create();
    //$hello=$block->getValue();
    //echo $hello;
    }
}


texts: Enabling debug toolbar and toggle status caused HTTP error

texts:
I had enabled a Debug Toolbar.
Got a menu on the right side, where you could toggle the status of modules installed. Now I just wanted to see what it would show, and clicked the first one, I think it said Magento. Cannot reproduce anymore.
Now I cannot access the site anymore, only the backend.
Can someone please help?


texts: Magento 2 : What is Use of @codingStandardsIgnoreFile, @codeCoverageIgnore, @codingStandardsIgnoreStart and @codingStandardsIgnoreEnd

texts:
In Any Custom[Module/Extension] development What is use of

@codingStandardsIgnoreFile
@codeCoverageIgnore
@codingStandardsIgnoreStart
@codingStandardsIgnoreEnd

It is Valid in Magento Marketplace Extension Development

And It is valid Then Where We can Use For ignore Coding Standard Errors/Warnings

This is used in InstallData, Why it is used here ?


texts:
I have a setup a multi website.
https://domainname.com and https://demo.domainname.com

I need to share cart items between each website.
So if i have added a cart items to A website and if i login to B website than it must be found there as well.

I have set Share Customer Account = Global in Stores->Configuration->Customer Configuration->Account Sharing Options

Please help me to sort out this issue.

I am using Magento 2.2.6


texts:
Older versions worked well but after upgrading to version 1.9.2 e-mails don't send anymore. I set up cron with command line :
php -f /home4/myserver_name/public_html/cron.sh
5min
The only e-mail I get is the cron_daemon sending me the cron.sh file..!!
After researching for hours and trying different solutions I am at my witts end. Nothing worked. Ant help his highly appreciated! Thx in advance!


texts: How can move/use one element at different position? In Magento 2.2.3

texts:
<move element="product.info.stock.sku" destination="product.info.addtocart" as="product.info.stock.sku.old"/>
<move element="product.info.stock.sku" destination="product.info.addtocart.additional" as="product.info.stock.sku.additional"/>

I have tried the above code in catalog_product_view_type_simple.xml file and getting as

<?=$block->getChildHtml('product.info.stock.sku.old',true);?>
<?=$block->getChildHtml('product.info.stock.sku.additional',true);?>

But only one work at a time, actually I want to move sku in simple product which has options or not.


texts:
I see in the admin panel this code {{depend prefix}}  {{/depend}}:

What does it mean?


texts: I would like to add various custom tabs to a range of products is it possible to have different tabs for each product?

texts:
Hi I have many products which I would require extra tabs for. I would like to be able to arrange the order of the tabs and also have different tabs for various products. I don't want the tabs to be the same on every product page is this possible?

I've see some extensions for custom tabs but without downloading these and installing them I've no idea if any of them would be suitable.


texts: Magento: How to hide the default store view code from url

texts:
I tried to install the extension magento-store-code-master,
but nothing happened to me. Can anyone give me more detailed instruction for installation? appreciated!

I followed the instruction to copy the app directory to my root directory home/public_html, but nothing happen?


texts:
I have a set of images that I would like to include in the product descirprion part... especially in the long description, however I am unable so.

I insert the photos and then save the page, after which the images are being shown as broken. However in my folders they are showing properly.

any idea why this can happen?


texts: Missing write permissions in directory pub/static when run bin/magento setup:upgrade

texts:
The day before, I updated a new module and it was working normally. Now, when I run bin/magento setup:upgrade, I receive the below Exception. I tried setting permissions to 777 (or 770) for the pub folder in Magento 2 but it is not working.

    [Exception]
    Missing write permissions to the following directories: 'pub/static'


texts: how to add minicart in custom header block in magento2

texts:
i have created block in theme in magento2.
block location is "theme-folder/template/html/header.phtml".
i want to add minicart in this Phtml file.


texts: Js error when first time loading  site magento 2 in chrome browser. Firefox, and explorer no problem. One of the problem is here.  http://prntscr.com/kso59y


texts: I have a phtml file that needs to load the weight unit of the product, the weight unit is from the store configuration, is there a way to do this?


texts: How do I change the default value of the “position” category attribute?

texts:
I would like to update the default position value that products are assigned when they are added to a category.

When you create/update a category from the categories editor, new products are saved with a position of 0.

What I want to do is have items save with a position of 100 instead of 1.

Thank you!


texts: How to create a Magento 2.1 custom payment to save credit card information

texts:
I am unable to use Authorize.net or PayPal in the country my store is working. I'm migrating from magento 1.9 to magento 2.1; and I manually process all my payments from credit cards using the Save CC in magento 1.9.

How can I create a custom payment method in magento 2.1 that will allow me to save CC information.


texts: Magento 2: How to add rating filter in magento ver 2.3

texts: I want to add a rating filter in layer navigation. For that, I have copy module-catalog from vendor/magento to app/design/frontend/Magento. So in which file we need to add rating code? I have tried many blogs but did not get success.


texts:
I have changed the suffix to .asp via the SEO section in Magento2 panel.

Although all pages & products are opening properly.

  I wanted to know from your experience, will this cause any unexpected
  issues? Like, Server trying to execute it as actual .asp page, or incompatibility with Magento's internal working


texts: Resize images of Magento 2 doesn't work correct

texts:
My product images have size is 600 x 600px. in file view.xml I have configured:

<image id="category_page_grid" type="small_image">
      <width>300</width>
      <height>366</height>
</image>

But the images that I get in category page is 300 x 300px, not 300 x 366px.
Any help would be appreciated!


texts: Unable to verify this site. Please recheck your verification code and try again!

texts: Can someone help me? I've been resting on this for a couple of weeks, looking at a lot of solutions, and they haven't solved my problem, and I don't know why the Magento scan is giving me a headache?


texts:
Every One, recently I started with Magento 1.9 and now also want to start with Magento 2 (for reason).

I need direction to get the start and learn it as soon as possible
and I found very difficult to find a solution when an error occurs.

I know oops basic and for one year, I was working on CI and PHP core(Procedural).

Please Help and Thank you!


texts: Remove Addresses tab from customer edit page magento 2

texts: How to remove Addresses tab from customer edit(form) page in admin panel Magento 2?


texts: Product Video Plays after clicking two times in mobile

texts:
I have added a video for a product using the youtube link.
It is working properly on the desktop and plays automatically when the page completes loading.
However, on mobile, I have to click two times to play the video.
How can I get rid of this issue?


texts: Cannot translate popup message when adding a product to the cart

texts:
If you add a product to the shopping cart, a message pops up on top saying "Cannot add the item to shopping cart."

The problem is that you need to log in first, but this is not clear to the customer. So I would like to change the message in something like "You need to login first".

Now I have tried to find the string in the csv files, but cannot find it. I have tried to add the string to translate.csv but that does not work.

I tried inline translation, but no little book appears with the popup message, so I cannot change it.
I tried template hints to see where it comes from, but here too, I don't see anything.

I am stuck and wonder where the string comes from. The English string is translated into Dutch, so it must be somewhere. Right?


texts: Admin Backend Layout problem after extension install

texts:
So I have installed an extension (sagepay suite by ebizmarts) on Magento 2.17 but instead of doing the install via composer I did it the manual way by unzipping the extension into the Code folder.

After this, I did the usual of:

Execute Magento setup upgrade - $ bin/magento setup:upgrade
Clean cache and generated code - $ bin/magento cache:clean and then $ rm -rf var/generation/*
Run magento compiler to generate auto-generated classes - $ bin/magento setup:di:compile

Static Content Deploy

Now both the backend and the website looks strange, as if the static files or CSS styling is not being applied. I thought there was a problem with the extension, so I deleted the extension and reran the steps above, but the problem is still there, so I am guessing I have missed an important step - Any ideas?

I have noticed some errors in the recompile command, these are to do with the Blank / luma theme which is installed such as:

frontend/Magento/blank/en_US/css/email-inline.less
Unable to get content for 'frontend/Magento/blank/en_US/css/source/lib/_lib.less'


texts:
I have mention below template file for faq.But it throws all html tags in frontend.How to remove this? If It is correct way use escapeHtml in template file.Is it neccessary or not?

<?php
    $collectionTitle = $this->getCollectionTitle();
    ?>

        <?php foreach ($collectionTitle as $item): ?>

                        <?php echo $block->escapeHtml($item->getCategoryName()); ?>

            <?php $collection = $this->getCollection($item->getId()); ?>

                <?php foreach ($collection as $items): ?>
                    <?php echo $block->escapeHtml($items->getQuestion()); ?>
                    <?php echo $block->escapeHtml($items->getAnswer()); ?>
                <?php endforeach; ?>

        <?php endforeach; ?>

Layout file

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

        <title>FAQs</title>

        <referenceContainer name="content">
            <block class="Xxx\Faqs\Block\Faq\Collection" name="footerLink" template="Xxx_Faqs::view.phtml">
                <container name="form.additional.info" label="Form Additional Info"/>
            </block>
        </referenceContainer>

</page>


texts:
My website developer gave me a limited access to Magento admin-panel. Now he left the field without giving me the full access.

Help me access admin completely and access site resource.


texts: Local.xml not making changes to meta descriptions and titles

texts:
I'm trying to edit some page titles and meta descriptions on a custom theme in Magento 1.4.1 (I just inherited this project and it's my first time working with Magento).  I've tried in both app/design/frontend/default/default1/layout/local.xml and the theme layout xml files like layout/customer.xml.  Here is my local.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
    <checkout_cart_index>
        <reference name="head">
            <action method="setDescription" translate="title">
                <title>This page sumarizes your shopping cart with Store Name. Use this page to checkout and place your order. Please call us at tel with any questions.</title>
            </action>
        </reference>
    </checkout_cart_index>

    <customer_account_login>
        <reference name="head">
            <action method="setTitle" translate="title">
                <title>Login to your account on store.com. Once you login, you may review your account information and make changes easily. To begin, login below.</title>
            </action>
        </reference>
    </customer_account_login>

    <custom_account_forgotpassword>
        <reference name="head">
            <action method="setTitle" translate="title">
                <title>Forgot Password</title>
            </action>
        </reference>
    </custom_account_forgotpassword>

</layout>

I've cleared and refreshed cache on the admin panel.  What am I missing?


texts: how to get magento2 base url for backend?

texts:
I want replacement of following in Magento 2

Mage::helper("adminhtml")->getUrl("module_name/controller_name/action_name/");


texts: Varnish and no-store, no-cache, must-revalidate, max-age=0

texts:
I am using Varnish with Magento 2.
I see that cache works (but for a short time) since I have the X cache: hit. And the TTFB is really good (40ms).

But I have *no-cache, must-revalidate, max-age=0* on the header for each page.
My problem is that the varnish cache works for only a short time..


texts: Magento 2 : Change text "Please enter a valid email address (Ex: johndoe@domain.com)." in validation

texts:
I am using Magento 2.3.4 and
want to  Change text "Please enter a valid email address (Ex: johndoe@domain.com)." in validation.
in email validation , login field.


texts: Understanding Process of compilation and cache

texts:
I need to understand what is actually process done by compilation ? how can it help to speed up magento site. Why we are not able to install extension when compilation is in enable mode.

Also need to understand about cache what is process the actually done  by catch and how can it improve speed of site loading time.


texts: magento 2.2.5 import impossible 1 row 1 product gives error Unable to unserialize value

texts:
I'm running magento 2.2.5. All fine except the import not working.
I try to import, check data, all ok it says.I Then click on import and gives me
"General system exception happened" Unable to unserialize value.

The file I try to import is an export of the products and then only leave one row without any changes.

Check test.csv file on https://files.fm/u/xpat3a7q#_

Many thanks in advance.


texts: Loading multiselect product attribute values in magento2

texts:
I have tried:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$p = $objectManager->get('\Magento\Catalog\Model\ProductRepository')->getById($pid);
$customattr = $p->getData('customattr');
echo print_r($p->getData('sku'));
echo print_r($customattr);

And tried

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$p = $objectManager->get('\Magento\Catalog\Model\Product')->load($pid);
$customattr = $p->getData('customattr');
echo print_r($p->getData('sku'));
echo print_r($customattr);

And I get the product's sku but customatrr is always always always null.

and yet if I do this:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$p = $objectManager->get('\Magento\Catalog\Model\ProductRepository')->getById($pid);
$attr = $p->getAttributes();
foreach($attr as $a){
    $t = $a->getName();
    if($t == "customattr") break;
}
$options = $a->getOptions();
foreach($options as $o){
    $l = $o->getLabel();
    print($l);
    $v = $o->getValue();
    print($v);
    echo "\n";
}

I get a list of all the attribute values that are possible for customattr but not what ones are selected.  Using dependency injection doesn't help and they've made it nearly impossible to extend the constructor for the model I am using anyway so that's why I'm using the object manager.  I guess I could do a helper but if it won't work here there's no reason it should magically work somewhere else, so why isn't this working?

Someone else had the same problem and said clearing the cache fixed it: https://stackoverflow.com/questions/34853553/loading-custom-attribute-value-in-controller-in-magento2  But I have ran magento cache:clean, and redeployed and re compiled several times and I always get the same result, I'm also in developer mode.


texts:
I'm trying to install Magento 2 via composer and following this link for instructions. In step 2,

composer install

I get a php version error.

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php ~5.5.0|~5.6.0|~7.0.0 but your PHP version (5.3.29) does not satisfy that requirement.
  Problem 2
    - Installation request for magento/composer 1.0.2 -> satisfiable by magento/composer[1.0.2].
    - magento/composer 1.0.2 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 3
    - Installation request for pelago/emogrifier v0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
    - pelago/emogrifier v0.1.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 4
    - Installation request for league/climate 2.6.1 -> satisfiable by league/climate[2.6.1].
    - league/climate 2.6.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 5
    - Installation request for sjparkinson/static-review 4.1.1 -> satisfiable by sjparkinson/static-review[4.1.1].
    - sjparkinson/static-review 4.1.1 requires php >=5.4.0 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 6
    - Installation request for symfony/stopwatch v3.2.1 -> satisfiable by symfony/stopwatch[v3.2.1].
    - symfony/stopwatch v3.2.1 requires php >=5.5.9 -> your PHP version (5.3.29) does not satisfy that requirement.
  Problem 7
    - colinmollenhour/php-redis-session-abstract v1.1 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
    - colinmollenhour/php-redis-session-abstract v1.1 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (5.3.29) does not satisfy that requirement.
    - Installation request for colinmollenhour/php-redis-session-abstract v1.1 -> satisfiable by colinmollenhour/php-redis-session-abstract[v1.1].

I changed my php version in cpanel to 5.5 but using php -v still showed 5.3. So I followed this link to add an alias to ~/.bashrc file

alias php=/opt/php55/bin/php

Logged out and back in to SSH and php -v returns 5.5. Went back to install composer and it showed the exact same error. I've also did what was mentioned on this answer but it didn't work either.

How do I update php for composer?


texts: Custom setting Option for magento admin panel

texts:
I want make a custom option as custom module in admin panel in product adding or product edit option.

That there is custom checkbox will show by the name of "Check this box for showing this product only in home page".

How I can do it in Magento 2.2.5 version.
I'm little newbie in Magento 2.2.5 version.

Please help me how to do this as step by step.


texts: side menu left in category and subcategory

texts:
In this web site:
http://shop.caffemauro.com/it/caffe

the left menu (where the title is) "CAFFE"

is the same in all subcategory

http://shop.caffemauro.com/it/caffe/caffe-casa

http://shop.caffemauro.com/it/caffe/caffe-bar

http://shop.caffemauro.com/it/caffe/cialde-in-carta

etc...

How make it?

Usually the left menu there is only in category not subcategory.


texts: Magento 2 looking in /en_US/ and can't find my files

texts:
I'm trying to theme a magento website, however I already ran into some problems.

I'm following THIS guide.

However when I refresh my page, Magento can't find my styling or my custom logo and I can't find out why.

here is my Magento_Theme/layout/default.xml file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/mt_logo.png</argument>
                <argument name="logo_img_width" xsi:type="number">300</argument>
                <argument name="logo_img_height" xsi:type="number">300</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

this is the error I'm receiving in my console:

  GET
  http://localhost:8888/magento/pub/static/frontend/Nicolas/mytheme/en_US/images/mt-logo.png
  404 (Not Found)

My logo is saved in mytheme/web/images

How do I solved this issue?


texts:
when RMA is created by customer for exchange resolution.

Will any new order for exchanged order will be created or in same old order it will be showing.

if any customer want large size instead of medium , than again at the time of forward shipment for exchanged product how size will change in the invoice ?

how price will change in the invoice if any price change is there ?


texts: Paypal express - double order status feedback through IPN

texts:
since a couple of weeks we are using a fulfillment company to ship our orders. This company will import all orders with the status processing (payment OK).

For orders paid with paypal we have some issues because paypal will give a order status feedback 2 times with sometimes more then 30 minutes in between. This will mean the order status is already changed to the order status of the fullfilment company but will be changed back to processing by paypal.

You can see the feedback 2 times in the screenshot.

I tried to change the status with below instruction but that doesn't work.

Set new order paid via PayPal Express to 'Pending'


texts: Magento 2 Customers not displayed in admin grid

texts: When a customer registers, the details are loaded to the database and the customer is able to login and do the purchases. But in the Customer -> All Customers I am not seeing any registered customers. Please help. I have attached the screenshots in this link.


texts:
On Magento 2.0 I had a console command to delete products under some circumnstances.

After upgrading to 2.1 it doesn't work anymore. It throws the infamous Area code not set error.

The strangeness however is that I set the area code in my script.

If I put a breakpoint in State::getAreaCode I see my areacode set until the FlushCacheByTags::aroundDelete plugin is called. There suddenly my State::_areaCode property is null and the exception is thrown.

Does someone encountered a similar problem?

Here there are relevant parts of code involved:

Console command constructor:

public function __construct(
        State $state, //This is Magento\Framework\App\State
        ArrayInputFactory $arrayInputFactory,
        PruneFactory $catalogPrune,
        Registry $registry
    ) { ... }

at the beginning of command execute I set the area code in this way:

$this->state->setAreaCode(Area::AREA_ADMINHTML);

then I delete products in this way:

$product->getResource()->delete($product);

I tried also

$this->productRepository->deleteById($product->getSku());

but it is the same since the repository ultimately calls the ResourceModel delete as above. I need my command to be fast, so I avoid to use repositories and go for the low level approach.


texts:
I am trying to overwrite a module cron file like this:

<?xml version="1.0"?>
<config>
    <modules>
        <Nafees_Updatemandrill>
            <version>1.0.0</version>
        </Nafees_Updatemandrill>
    </modules>
    <global>
        <models>

            <ebizmarts_autoresponder>
                <rewrite>
                    <cron>Nafees_Updatemandrill_Model_Cron</cron>
                </rewrite>
            </ebizmarts_autoresponder>

        </models>
    </global>
</config>

but its not working.

Below is whats in that module config file:

<crontab>
    <jobs>
        <ebizmarts_autoresponder>
            <schedule>
                <cron_expr>0 * * * *</cron_expr>
            </schedule>
            <run>
                <model>ebizmarts_autoresponder/cron::autoresponder</model>
            </run>
        </ebizmarts_autoresponder>
    </jobs>
</crontab>


texts:
In a custom payement gateway, where the store redirects to third party website for payment. To request i have options to send either in POST/GET. I'm requesting with POST method. But the response they give is in get method.

The response url according to their documentation is http://yoursite.com/success?q=su&oid=XYZ1234&amt=100&refId=000AE01

And in my case i have captured response at http://yoursite.com/cgateway/payment/response with responseAction method of PaymentController.php controller.

The result i obtained is http://yoursite.com/cgateway/payment/response?q=su&oid=XYZ1234&amt=100&refId=000AE01

Now the problem is how should i get those data in responseAction in PaymentController ?


texts: How can i solve small image not visible error

texts: The product consists the 3 sides of images, but front end only visible 2 images only.


texts: Payment method Doesn't Show full credit card options on checkout page in magento 2

texts:
However my custom Payment method show credit card options but not functional neither show CVV option and Dropdown for years and months. Help me?

Here is the screenshot

Here is the console error


texts: If Attribute value = "Yes" - > Available , "No" - > NOT AVAILABLE?

texts:
we created an attribute "Cash on delivery"

using Drop down we gave 2 values "Yes/No"

if the value is "Yes", we are displaying " Available".

if the value is "NO", its not displaying "Not Available". This is the Problem. If Attribute value = "NO", It should display "Not Available" in Frontend.

we are using following code.

<?php
$attribute = $_product->getResource()->getAttribute('cod_available');
$attribute_value = $attribute ->getFrontend()->getValue($_product);
if ($attribute_value == "Yes")
{?>

?
<?php echo "Available";?>
<?php
 }

else
{?>

<?php   echo " Not Available";
}
?>


texts: Magento 1.7.0.1 UPS XML rates incorrect when Free Method of Ground is enabled

texts:
I don't often get completely stumped, but has anyone see this before. When rates were being calculated using Magento 1 UPS method set to XML rates were being returned but completely off.  The first screenshot you can see that Ground is coming back the most expensive.

I then continued to work through the site, I investigated the UPS XML logs in real time, and the rates being returned weren't even in the ballpark of what I was seeing on the Front-end.  So I did the whole, it's working in QA but not in production, what's different.  Upon investigation, I found UPS's Free shipping Method enabled as "Ground". I didn't think this would cause the issue, but I disabled it and tried again.  Low and behold rates came back as expected.  Screen Shot Below:

Has anyone seen anything like this before, or had an issue with the UPS free shipping module? I may just start stepping through code in the meantime to see what happens.  Hope someone can help!

Robert


texts: Customer Login, Products and Place Order REST APIs for React Native from an existing Magento 2 website

texts: I've figured out how to login using customer credentials and get the token. I'm not able to fetch the products, categories with this token. Do I really need an admin token? Is it not safe to expose this admin token in my code?


texts: Magento 2: Change web site customer is registered to - will this cause issues?

texts:
We have a Magento 2.3.3 store set up with multiple websites, each with different pricing and currency for different countries.

One of our customers has moved to a different country and wants the website they are registered to changed so that they can continue shopping with us but still have a history of past orders under their account.

I see that Magento 2 now allows for the customer website to be changed from the Customers panel.

Is this safe to do or are there any pitfalls we should be aware of?


texts: Magento 2 - get Qty of used products of Configurable

texts:
I'm trying to take the various quantities of the products associated with the configurable in this way but the code does not work:
$simple_collection = $_product->getTypeInstance()->getUsedProducts($_product);
foreach($simple_collection as $simple_product){
$simple_product->getExtensionAttributes()->getStockItem()->getMinSaleQty();
}

Instead for simple products this code works well:
echo $_product->getExtensionAttributes()->getStockItem()->getMinSaleQty();

How can I take the quantity for associated products?
One last question, is it possible to take these quantities in ajax for example at the click on the color?


texts: Why is shopping cart not emptied after placing an order?

texts:
I have magento 1.9 installed. After placing an order while logged in, the shopping cart is not being emptied. If I place an order as "guest" though, the cart is emptied.

Is this an option somewhere, or just default behaviour?
I would expect the cart to get emptied wether logged in or not.

UPDATE

This happens with persistent shopping cart both enabled and disabled.


texts: Magento 1.9: Google Payment Gateway module

texts: I'm looking for a module for Magento Google Pay Gateway method, please help me, I'm stuck. How to get module or from where I can get, or otherwise is it required to used third party payment gateway module ?


texts: Get ids of the products which a bundle product contains

texts:
I need to get the id of each product which composes the bundle product.
There is this foreach ($optionsArray as $_option) in
public function getJsonConfig() from \app\code\core\Mage\Bundle\Block\Catalog\Product\View\Type\Bundle.php
I need for each product which is in the bundle I want to get a custom attribute.
I tried some solution but I am not able to get what I need


texts:
I want to connect the SFTP in Magento  2

here is my code.

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

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

$objectManager = $bootstrap->getObjectManager();

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

$sftp = $objectManager->create('Magento\Framework\Filesystem\Io\Sftp');
$open =  $sftp->open(array('host' => 'hostname','username' => 'username',
'password' => 'password',));

 if ($open)
 {
 echo "true";
 }
 else
 {
 echo "false";
 }

but does not work that code.


texts: Magento 2 curl send header with response

texts:
I call Curl in my code. Please have a look

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
public function __construct(

            \Magento\Framework\HTTP\Adapter\Curl $httpAdapter
) {
    $this->_httpAdapter = $httpAdapter;
}
    public function createBookingNumber($service,$order)
            {
 $config = array('timeout' => 60);
 $this->_httpAdapter->setConfig($config);
    $this->_httpAdapter->addOption(CURLOPT_RETURNTRANSFER, 1);
    $this->_httpAdapter->addOption(CURLOPT_HEADER,0);
    $this->_httpAdapter->addOption(CURLOPT_POST,1);
$this->_httpAdapter->write(\Zend_Http_Client::POST, 'myapi url', '1.1',array("Authorization: Basic cm9iaW5sYXVAcG9zdG5ldC5jb20uYXU6TWFnaWNtYW4yMTEwNzU=",
  "Content-Type: application/json"), json_encode($data));  // $data is an array which I need to convert in jeson and send.

    $response = $this->_httpAdapter->read();
    print_r($response);
    $this->_httpAdapter->close();
}

}

But when I print my response I am getting header too, but I set false in my code.

My Response :

HTTP/1.1 200 OKDate: Tue, 10 Jan 2017 10:42:04 GMTServer: Apache/2.4.7 (Ubuntu)Vary: Authorization,Accept-EncodingX-Powered-By: PHP/5.5.9-1ubuntu4.17Cache-Control: no-cacheSet-Cookie: XSRF-TOKEN=eyJpdiI6IjFxQ05ZZUpIQVFUWU4wWU9ZaW16cHc9PSIsInZhbHVlIjoiaVFCZVhwZ01HN3laUDhwSGFcL0Z6Z1lsOTd6VUxsXC93REFiXC8yMThlRVk1cklRUmQxVmlYaGlibjdVU25rNkxMY3BHTmJWVTJrazl6YVwvMnJOWTZYaHJBPT0iLCJtYWMiOiI3ZWZjYmU3ZTZkMmJhMWVkOWE4OTFmMzliMTNhZDg2ZjE5ODE5NzE3NDNlN2U2MzkyZDBmM2Q2YjcwOTE0MGJhIn0=; expires=Tue, 10-Jan-2017 12:42:12 GMT; Max-Age=7200; path=/Set-Cookie: laravel_session=236088dea752bc581c762a9448febf1eb085fc2c; expires=Tue, 10-Jan-2017 12:42:12 GMT; Max-Age=7200; path=/; httponlyTransfer-Encoding: chunkedContent-Type: text/html; charset=UTF-8.{"status":"ok","response":{"user_id":17,"vendor":"dhlcp","description":"","tracking_no":"CPWEXPD000000131","label_pdf":"JVBERi0xLjQKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgNDIwLjAwIDU5NS4wMF0KL1Jlc291cmNlcyAyIDAgUgovQ29udGVudHMgNCAwIFI+

Can you please help.


texts: How can I update a custom addres field from quote addres to sales order address when creating a multishipping order

texts:
I have inserted custom address fields in quote address trough fielset.xml successfully  but it is not working for sales order address, it is not filling custom fields on database. This is when using multishipping process
 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
    <scope id="global">
        <fieldset id="customer_address">

            <field name="descripcion_sucursal">
                <aspect name="to_quote_address" />
            </field>

        </fieldset>
        <fieldset id="sales_convert_quote_address">
            <field name="descripcion_sucursal">
                <aspect name="to_order_address" />
            </field>

        </fieldset>
    </scope>
</config>


texts: I want relevant block and template in Magento 2?

texts:
I need relevant Block and Templates for Magento 1 to Magento 2?
Blcok -> checkout/cart_totals
Template -> 1. checkout/onepage/review/totals.phtml     2. checkout/cart/totals.phtml

$this->getLayout()->createBlock('checkout/cart_totals')->setTemplate('checkout/onepage/review/totals.phtml')->toHtml();

$this->getLayout()->createBlock('checkout/cart_totals')->setTemplate('checkout/cart/totals.phtml')->toHtml();

Convert this from Magento 1 to Magento 2?


texts: Display message from message manager above specific block Magento 2

texts:
I have redirection from controller to CMS page with custom message defined using messageManager.

It show up the message before my CMS page content begins (below header part).
but i want to display that message above specific block of that CMS page.

This is how my CMS page is

/*** HTML content ***/
{{block name="custom-form" class="Magento\Framework\View\Element\Template" template="Vendor_Module::custom_form/index.phtml"}}

How can we do it?

I have referred this link which suggests to make change in layout file, which won't be useful in my case.

Can Layout Update XML of Design section of CMS page be useful in this case? I wrote below line in that field but no effect.

<move element="page.messages" destination="custom-form"  />

Or is there any way to move message inside custom_form/index.phtml ?


texts:
Uncaught TypeError: Cannot read property 'remove' of undefined -- upgrade from 2.3.4 to 2.4.1
I'm testing out an upgrade of our Magento store from  2.3.4 to 2.4.1. One issue I have come across is this Javascript error that seems to occur on every page:
Uncaught TypeError: Cannot read property 'remove' of undefined
at customer-data.js:178
at Function._.each._.forEach (underscore.js:145)
at Object.remove (customer-data.js:177)
at Object.invalidate (customer-data.js:336)
at 1cc0eb0120ba46c0d78f41f8e5526a7e.js:4184
at Object.execCb (1cc0eb0120ba46c0d78f41f8e5526a7e.js:1650)
at Module.check (1cc0eb0120ba46c0d78f41f8e5526a7e.js:866)
at Module.<anonymous> (1cc0eb0120ba46c0d78f41f8e5526a7e.js:1113)
at 1cc0eb0120ba46c0d78f41f8e5526a7e.js:132
at 1cc0eb0120ba46c0d78f41f8e5526a7e.js:1156

This appears to come from the following section in customer-data.js:
/**
     * @param {Object} sections
     */
    remove: function (sections) {
        _.each(sections, function (sectionName) {
            storage.remove(sectionName);

            if (!sectionConfig.isClientSideSection(sectionName)) {
                storageInvalidation.set(sectionName, true);
            }
        });
    }

It seems like the Javascript failure is preventing other Javascript elements on the site from executing correctly. For example, Add to Cart buttons, tabs on the detail page, account creation form, all aren't loading properly. We do use a custom in-house theme, however, I switched to the stock Magento Luma theme, and the exact same issue is happening there, so it's not related to our theme.
Has anyone else seen this issue? Any ideas how to fix or work around it?


texts: Magento access Admin Custom Controller without Login

texts:
I tried to access the Admin Controller without Login, it redirects me to Admin login page. I added below function in my custom controller, but it is not working.

public function preDispatch()
    {
        Mage::app()->getRequest()->setParam('forwarded', true );
        return parent::preDispatch();
    }

Can anyone please suggest, how to make it work.

I tried to rewrite it is not working,

require_once "Mage/Adminhtml/controllers/IndexController.php";

class Namespace_Modulename_Adminhtml_SchooladminController extends Mage_Adminhtml_IndexController
{
    public function loginAction()
    {
        if (Mage::getSingleton('admin/session')->isLoggedIn()) {
            $this->_redirect('*');
            return;
        }

        $loginData = $this->getRequest()->getParam('login');
        $username = (is_array($loginData) && array_key_exists('username', $loginData)) ? $loginData['username'] : null;
        echo 'Override';
        exit;
        $this->loadLayout();
        $this->renderLayout();
    }
}


texts: How to prepopulate credit card form with customers name in Magento?

texts:
In the checkout, how can one add the customer's name to the credit card form? Is there a way to get the customer name int the checkout page?

What I would like to do is have the customer's name during the checkout process to use in the steps.

For instance:

Like, "Hello Joe, this is step 3"
"You still with us Joe this is step 4"
In the credit card form add their billing name with a little "x" to clear it
if they want to use their uncles card.

How do I read the billing name to use it like this? The name appears in the progress bar so I thought that might work (as I don't show the bar).

It should be for all users, guests especially.


texts: Magento 1.9 Rest API - Fetch Product Data with Custom Attribute

texts:
I am using module (in Magento 1.9.3.10) that extends the default Mage/Product model by adding a new attribute named Status with a corresponding file named Status.php residing in Package\ModuleName\Model\Catalog\Product\Attribute.
The Status attribute also extends Mage_Eav_Model_Entity_Attribute_Source_Abstract.

If I try to access the REST API for products on either my development and production servers (with the required OAuth parameters), i.e http://localhost/magento/api/rest/products causes a 500 internal error whiles every other rest endpoint do not fail.

How can I include the custom attribute in the REST API without causing 500 internal errors?

NB: I am using an OAuth consumer which has been verified and I am able to fetch products IFF the custom module is uninstalled


texts: Custom Customer Attribute not Saving Magento 2

texts:
I have used the following script to add a custom customer attribute.

<?php

namespace Harrigo\ContractPricing\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Model\Customer;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface {
protected $customerSetupFactory;
private $attributeSetFactory;

public function __construct(CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory) {
    $this->customerSetupFactory = $customerSetupFactory;
    $this->attributeSetFactory = $attributeSetFactory;
}

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {

        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

        $customerSetup->addAttribute(Customer::ENTITY, 'cp_permissions', [
            'type' => 'static',
            'label' => 'Account Type',
            'input' => 'select',
            'source' => \Magento\Eav\Model\Entity\Attribute\Source\Table::class,
            'required' => false,
            'visible' => true,
            'user_defined' => false,
            'sort_order' => 101,
            'position' => 101,
            'system' => false,
            'adminhtml_only' => true,
            'option'         => ['values' => ['Master', 'Branch']]
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'cp_permissions')
            ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer'],
            ]);

        $attribute->save();

        }
    }

The attribute after some difficulty now shows on the form however no longer saved. Initially the attribute didn't show until i set the source differently and set user_defined to false. I originally changed these in database and all worked however now that i've got the installer script almost working (attribute shows and source was set within database) i have noticed that values are not saving.

I have checked and system value is set to 0 / false in customer_eav_attribute table.


texts: Magento 2 - Checkout Agreements checked by default

texts:
I activate the terms and conditions for default onepage checkout on Magento 2.

I want that for default the agreements be checked.

I tried to modify these line on vendor/magento/module-checkout-agreements/view/frontend/web/template/checkout/checkout-agreements.html:

<input type="checkbox"
                        data-bind="attr: {
                                    'id': 'agreement_' + agreementId,
                                    'name': 'agreement[' + agreementId + ']',
                                    'value': agreementId
                                    }"
                        data-validate="{required:true}"
                        checked="checked"
                        />

Adding checked="checked".

But i think that as it is a js, it do not marked as checked.

Any idea?


texts: Magento 2: How to add grid to the tab in customer_index_edit

texts:
I am trying to display a grid for my module on an extra tab added on the customer_index_edit. I managed to add custom tab, and i am trying to add layout, like in Magento_Wishlist, but it`s unsuccessfully. When i click the tab, nothing changed.
Can someone help me?

UPDATE:

I created layout {Vendor}/{Extension}/view/adminhtml/layout/customer_index_edit.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_form">
            <block class="Webinse\Crm\Block\Adminhtml\CustomerReminderTab" name="crm_reminders">
            </block>
        </referenceBlock>
    </body>
</page>

Next, i created Block {Vendor}/{Extension}/Block/Adminhtml/CustomerReminderTab.php

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Webinse\Crm\Block\Adminhtml;

use Magento\Framework\Registry;
use Magento\Backend\Block\Template\Context;
use Magento\Ui\Component\Layout\Tabs\TabWrapper;
use Magento\Ui\Component\Layout\Tabs\TabInterface;
use Magento\Customer\Controller\RegistryConstants;

class CustomerReminderTab extends TabWrapper implements TabInterface
{
    /**
     * Core registry
     *
     * @var Registry
     */
    protected $coreRegistry = null;

    /**
     * @var bool
     */
    protected $isAjaxLoaded = true;

    /**
     * Constructor
     *
     * @param Context $context
     * @param Registry $registry
     * @param array $data
     */
    public function __construct(Context $context, Registry $registry, array $data = [])
    {
        $this->coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    /**
     * @inheritdoc
     */
    public function canShowTab()
    {
        return $this->coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
    }

    /**
     * Return Tab label
     *
     * @return \Magento\Framework\Phrase
     */
    public function getTabLabel()
    {
        return __('CRM');
    }

    /**
     * Return URL link to Tab content
     *
     * @return string
     */
    public function getTabUrl()
    {
        return $this->getUrl('customer/*/reminder', ['_current' => true]);
    }
}

Next {Vendor}/{Extension}/view/adminhtml/layout/customer_index_reminder.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">

    <container name="root">
        <block class="Magento\Framework\View\Element\Template" as="grid">
            <arguments>
                <argument name="template" xsi:type="string">Webinse_Crm::customer/edit/tab/reminder.phtml</argument>
            </arguments>
        </block>
    </container>
</layout>

And template {Vendor}/{Extension}/view/adminhtml/templates/customer/edit/tab/reminder.phtml

<?php echo 'hello world'; ?>

But it`s not working. When i click on the tab, i have nothing.
Can someone explain how to do this in the right way?


texts: Magento 2 : Error - Only dependency assignment operations are allowed in constructor. No other operations are allowed

texts:
WARNING | Only dependency assignment operations are allowed in
      |         | constructor. No other operations are allowed.

I am getting this type of error while checking magento coding standard.

I posted here my controller code when error generated.

<?php
namespace CompanyName\ModuleName\Controller\Index;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\MediaStorage\Model\File\UploaderFactory;

class Index extends \Magento\Framework\App\Action\Action
{
    /**
     * [$_fileUploaderFactory description]
     * @var [type]
     */
    protected $_fileUploaderFactory;

    /**
     * [$filesystem description]
     * @var [type]
     */
    protected $filesystem;

    /**
     * [$scopeConfig description]
     * @var [type]
     */
    protected $scopeConfig;

    /**
     * [$storeManager description]
     * @var [type]
     */
    protected $storeManager;
    /**
     * [$helper description]
     * @var [type]
     */
    protected $helper;

    /**
     * [__construct description]
     * @param \Magento\Framework\App\Action\Context              $context             [description]
     * @param UploaderFactory                                    $fileUploaderFactory [description]
     * @param \Magento\Framework\Filesystem                      $filesystem          [description]
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig         [description]
     * @param \CompanyName\ModuleName\Helper\Image                    $helper              [description]
     * @param \Magento\Store\Model\StoreManagerInterface         $storeManager        [description]
     */
    public function __construct( //warning line display here
        \Magento\Framework\App\Action\Context $context,
        UploaderFactory $fileUploaderFactory,
        \Magento\Framework\Filesystem $filesystem,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \CompanyName\ModuleName\Helper\Image $helper,
        \Magento\Store\Model\StoreManagerInterface $storeManager
    ) {
        $this->_fileUploaderFactory = $fileUploaderFactory;
        $this->filesystem = $filesystem;
        $this->scopeConfig = $scopeConfig;
        $this->helper = $helper;
        $this->storeManager = $storeManager;
        return parent::__construct($context);
    }

    public function execute()
    {

        $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        $max_file_size = $this->scopeConfig->getValue(self::XML_PATH_MAX_UPLOAD_SIZE, $storeScope);
        $currentStore = $this->storeManager->getStore();
        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'file']);
        $fInam = $uploader->validateFile();
        ********************

        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'file']);

        ********************
        $path = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath('foldername/');
        $imgpath = $this->helper->imageResize('folder/' . $newFileName, 100, 100, 'folder/');

        ********************
    }
}

Can anyone please help me to solve this warning ?


texts: feature product show in homepage without added in category

texts: i removed all product from feature product  category, but still in homepage  many product is showing.


texts:
We have Fastly CDN configured in Website, and we have a custom page where we are displaying product listing. When admin makes changes in the product, it's reflecting correctly in front-end product details page but not in product listing page.

This listing page is custom page not default Magento category or product listing page.

So is there any configuration in Fastly CDN or in Magento 2 to refresh cache automatically?


texts:
For some reason my searchbar is always breaking as soon as I am installing the Amasty ElasticSearch
http://13.234.160.123/
Any solution to fix this? Your input will be highly appreciated
Thanks in advance


texts: unable to install B2B extension for magento 2.2.0

texts:
I m using magento 2.2.0 and trying to install B2B extension via composer require

composer require magento/extension-b2b

but i am getting bellow error

  [InvalidArgumentException]
  Could not find package magento/extension-b2b at any version for your minimum-stability (stable). Check the package
  spelling or your minimum-stability

I m using link for installation:

http://devdocs.magento.com/guides/v2.2/comp-mgr/install-extensions/b2b-installation.html


texts: Is there a way to limit the quantity of product ordered by a registered customer? We need to limit the amount to one product per customer. We are selling tickets to events.


texts: I want to disable "guest checkout is disabled" message

texts: I want to disable "guest checkout is disabled" warning on cart page. How can i this?


texts: How do I access submitted form data in custom payment method model functions (validate, capture, etc.)?

texts:
I've created a custom payment method that uses a custom template file to provide several form fields on the checkout page. The purpose is to make a call to an API, sending the data captured with this form.

Some of the form data needs to be validated against certain rules. In my payment method model (which extends Mage_Payment_Model_Method_Abstract), how do I access the values posted via the custom form? Specifically within the validate and capture methods.

I'm not sure what code would be relevant to post here, but I am happy to provide whatever is necessary upon request. Thanks.


texts: Changes does not reflect on frontend magento 2 issue

texts:
For temporary purpose, i have disabled all the 'Add to cart' options from my site, so that the customer cannot place the order.
I checked at my end, on desktop as well as on mobile, the Add to cart button is no more visible, hence, i was not able to place order.
But still, i am getting some order confirmations from customers end. How is this possible. How the customer's are able to place the order when there is no Add to cart button on the entire site.

My view is that, this is because of the customer's browser cache, my new changes are not reflected at there end. what can i do from magento site, that the changes get reflected at customer's end even there is previous browser cache.


texts: Remove Certain Shipping method on estimate and checkout

texts:
I want to remove Some of shipping method on both estimate and
checkout page.
If parameter in quote remove_all to 1 then remove all method which
are available and set only one which i have created.
if remove_all is 0 then remove just my custom shipping method keep
which all are available

I think there should be an observer event when all shipping methods are render and i can remove from there.


texts: Magento how to fetch row by row like PDO::fetch()

texts:
I am running

$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql = "SELECT id FROM customers_old";
$old_customers = $connection->fetchAll($sql);

But it's a HUGH table and this does not fit into memory:

  PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted

Normally I would make a loop an fetch row by row: $connection->fetch($sql)

But fetch does not exist here and fetchRow() always returns the same row.

Solution?


texts: Why are my product attributes not showing up on the frontend properly?

texts:
After upgrading from Magento 2.0 to 2.1, product attributes no longer seem to be working. Here is an example - notice that the color attribute is a swatch, and the size attribute doesn't exist at all. Both of these used to be dropdowns.

When I visit Stores -> Attributes -> Product and look at both of these attributes, they both seem to be configured correctly. "Catalog Input Type for Store Owner" is set to "Dropdown". If there are any other options I should have set a specific way, I'm not aware of them.

The two sizes that this product should have are "1.75mm" and "2.2mm". I created a test product to make sure the product data just wasn't corrupted in some way, and when I gave the test product those sizes, it wouldn't appear for that one either. However, other sizes did work. As far as I can tell, there's no difference between the working size attributes and the non-working ones except for the name.

I'm pretty new to Magento 2, and wasn't the one who performed the upgrade, so my knowledge is somewhat limited. Let me know what other information I could include to be more clear.


texts: Mixed Content... requested an insecure XMLHttpRequest has been blocked

texts:
I have been looking for this for weeks.  I just can't seem to find where this mixed content is coming from.  In the error below it always says the mixed content is my root domain name i.e., http://www.example.com/.

My site is all ssl frontend and back.  I have everything being redirected to the https version.

Here is the error in Chrome developer tools:

Mixed Content: The page at 'https://www.example.com/some-category/etc-product.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.example.com/'. This request has been blocked; the content must be served over HTTPS.

What would I search for??  I'm sure it's some kind of variable.  I really don't know.

Any help on this would be greatly appreciated.


texts:
I'm using magento 2 , and I just synced my store with magento marketplace , so now If I want to enable or disable a module from Web Setup Wizard page , I get this error from the readiness check :
PHP Version Check
Your PHP version is . The required PHP version is . Hide detail

Download and install PHP from www.php.net using this PHP Documentation.

For additional assistance, contact your hosting provider.

My php version is 5.6 , I have tryed to use also 7 but still get the error and I have also set always_populate_raw_post_data to -1 , but still getting the error.. Does anyone has any ideea how to fix this ?


texts:
In Magento 1 I am able to see tax rate options based on city but in Magento2 I am unable to see the tax rates based on the cities.
While creating tax rate i am unable to see city field but in one with city i am able to create


texts: Get available option values for product collection

texts:
im currently working on a project where i have to find out the available option values for a product collection.
Basically like the layered navigation but for a specific product collection.

Example:
Attribute color has 5 different values. ( blue, yellow, red, orange, green )
I only have products in my shop that have the values "blue", "yellow" and "red" set.
So what i need is kind of like this.

$collection        = Mage::getModel('catalog/product')->getCollection();
$option_collection = Mage::getResourceModel('eav/entity_attribute_option_collection')
    ->setAttributeFilter(1)                        // id of color attribute
    ->setProductFilter($collection->getAllIds())   // the important part
    ->load();

Any ideas?


texts:
I have create a ui-component grid in magento2 .I need to set the default symbol (if the end date is empty in that field) like -- for End  column in grid

<column name="date" class="Magento\Ui\Component\Listing\Columns\Date">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="filter" xsi:type="string">dateRange</item>
                        <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                        <item name="dataType" xsi:type="string">date</item>
                        <item name="label" xsi:type="string" translate="true">From Date</item>
                    </item>
                </argument>
            </column>

OUTPUT:

EXPECTED OUTPUT:

Thanks

  Array (
      [post_id] => 5
      [publish_time] => 2018-11-21 06:13:24
      [from_date] => 2018-11-21 05:30:00
      [to_date] => --
      [is_active] => 1     )


texts:
In app/code/MyModule/Checkout/view/frontend/web/template/steps/recipient/item/product-zone.html

I have

but when I look into the js-translation.json file, I can't find the translation.

I also have added the key Hello World,Hello World translation in the csv file.

From what I have read, this is a known issue with Knockout.js due to the file being an html and not a phtml.

How can I fix this ? Thanks


texts:
We can get the Grand total using : $order->getGrandTotal()

but i want grand total in words means if grand total is 499 , then i need to display : Four hundred and Fourty nine only


texts: magento 2.3.0 issue with WYSIWYG editor with special characters in URL

texts:
I have issue on magento 2.3 issue with WYSIWYG editor fails to parse directives of files with special characters in URL

<img src="{{media url=&quot;504928.jpg&quot;}}" alt="" />

Please check this screenshot : https://prnt.sc/lql08u

any have idea how to resolve it ?

Thanks.


texts: I need to Add a Custom Customer Attribute it should be visible in admin panel and should save in database

texts: How can Achieve creating Custom Customer Attribute that should be visible in customer page of admin panel how can I create can anyone help me out


texts: http://35.178.2.150/rep/india please hit this URL and inspect it, and help me if you can.


texts: Make backend url domain different from frontend url domain

texts:
How to make different URLs for website frontend domain URL and admin domain URL for Magento 2?

currently, this is how I access my Magento 2 site:

frontend: https://magento.zzz
backend: https://magento.zzz/admin

I have another server with different where I reserve a subdomain as an access to my Magento 2 website backend for later.

new backend: https://adm.businness.zzz

Is it possible to set up the backend URL only to above URL and how to do that?


texts: PayPal Express 'Skip Order Review Step' not 100%

texts:
Using Magento 1.9 PayPal Payments Pro (Includes Express Checkout). In the Express Checkout configuration I've set

Skip Order Review Step = Yes
Enable PayPal Guest Checkout = Yes

In testing PayPal presents different options depending on guest or logged in selection

As a guest - "Click continue to Complete" button

As a logged in user - "You're almost done, review on actual site"

Ideally I'd like to have both flows work as it does for the guest flow now. Presumably that's what Skip Order Review Step is supposed to do? Is it a bug perhaps, or some other configuration detail I'm missing on the Magento or PayPal side?


texts: Magento 2.3.5, custom option not show on configurable product

texts:
I have created configurable products with two attributes, some of the simple products associated with the configurable has a custom option.
In the product frontend, when I select the configuration, the option does not appear.

Instead, if I set the customized option on the main product, it appears.
But I need to show the option set on the associated product because the price varies according to the configurable product.

I would like to know if it is normal that the options are not shown for the simple products associated with the configurable?
Or, the custom options must be visible and therefore there is a bug?

Can you help me solve it?


texts: Magento 2 - overselling products on the web-site

texts: We're having the issue with many of our clients. They have a lot of products and customers buy a lot of products through different promotions. So sometimes we have an issue when one size/color is already out of stock (inventory 0, no backorders, status: out of stock) but the item is still available for sale on the storefront. It leads to overselling which is absolutely not good. After some time (I believe that's cache/indexer) quantity and stock status adjust itself and issue disappears. Does anybody have any thoughts on how to keep stock status up-to-date ALWAYS?


texts:
I will kindly appreciate if you let me know what is the difference between magento versions 1.9.2.4 and the latest one I think is 2.0.10?
I am not a developer I just build a Magento website and my VPS service advised me to download the latest Magento version .. but I just find out that it was built on 1.9.2.4
Alos if you smart guys know some links where I can get the basic of Magento (like how to upload products)


texts: How can i add date and month text box with validation(No calender)

texts:
How can I add Magento custom validation for month and date text box?
These two are input text box user can enter the number and I have to validate it via custom validation.
Don't want a calender.

                    Your Birthday

                            <input type="text" id="month" name="month" value="12" title="Month" class="input-text validate-custom">
                            MM

                            <input type="text" id="day" name="day" value="12" title="Day" class="input-text validate-custom">
                            DD

                            <input value="1900" type="text" id="year" name="year" title="Year" class="input-text validate-custom" autocomplete="off">
                            YYYY

                            <input type="hidden" id="dob" name="dob">

script

This code didn't work for me.


texts: Magento 1.9 get cart total based on site ID or site code

texts:
I have magento installation that contains 3 site. Now i want to get the cart total for each site and show in one place.
Is there any way to get the cart total based on site ID or site code ?


texts: Data success then "URL key for specified store already exists" error

texts: Having received 100% success, ready for import, the next page then denies the upload, why? I have tried making the document smaller, only 700 entries, but receive the same OK then the same error. Please help!


texts: Unable to add Attachment in email after upgrade to Magento 2.3.3 version

texts:
After upgrade magento version 2.3.2 to 2.3.3, email attachment is not work.
i used the reference for email attachment in magento 2.3.x but now it's not work anyone idea?


texts: Make column unique in install schema script

texts: I want my column to be unique. It is not an EAV attribute. I have seen some tutorials, where indexes are unique, but I am not sure it is not the same, as making column unique (or am I wrong?). Is there any way to achieve this?


texts:
I tried to run a unit but failed with the following error.

My test class

<?php

namespace Vendor\Module\Test\Unit\Observer;

class CheckoutOnepageControllerSuccessActionObserverTest extends \PHPUnit_Framework_TestCase {

    public function testExecute() {
        $this->assertTrue(false);
    }

}

I run the phpunit command at /dev/tests/unit/

phpunit --filter CheckoutOnepageControllerSuccessActionObserverTest

It returns the following errors

PHP Fatal error:  Call to protected method PHPUnit_Framework_TestCase::getMockForAbstractClass() from context 'Magento\Framework\TestFramework\Unit\Helper\ObjectManager' in /vendor/magento/framework/TestFramework/Unit/Helper/ObjectManager.php on line 139

Fatal error: Call to protected method PHPUnit_Framework_TestCase::getMockForAbstractClass() from context 'Magento\Framework\TestFramework\Unit\Helper\ObjectManager' in /vendor/magento/framework/TestFramework/Unit/Helper/ObjectManager.php on line 139


texts: Changing the layout of the layered navigation

texts:
I have a layered navigation, and the customer wants to have <select/> fields instead of a long list of links.

I thought about just changing the template with a observer if the name/id of the filter matches.

Any better ideas or recommendations? Alternatives to changing the template, maybe overwrite/rewrite the block or only change the block class for the two filters?

What event to use for changing the template?

I have then the same problem as here https://stackoverflow.com/questions/14524791/magento-enable-or-disable-a-module-in-code/14529629 because I have an observer who changes layout things. This is only theme relevant. So chechking the theme before running the updates might be a good idea?


texts: How to ignore(remove) <update handle="name" added in other layout

texts:
module-sales/view/frontend/layout/sales_order_view.xml

has following code:

<update handle="sales_order_info_links"/>

Is there any pretty way to remove such updates?

p.s. I know about removing particular blocks existed in file sales_order_info_links.xml from another layout like this:

<referenceBlock name="sales.order.info.links" remove="true" />


texts:
I'm trying to install magerun on my magento server but I just cannot make it run properlly.

I followed all the instructions from https://github.com/netz98/n98-magerun

  #wget http:// files.magerun.net/n98-magerun-latest.phar -O n98-magerun.phar

  --2015-10-09 11:02:51--  http:// files.magerun.net/n98-magerun-latest.phar
  Resolving files.magerun.net... 5.35.244.165
  Connecting to files.magerun.net|5.35.244.165|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 2787592 (2.7M) [application/octet-stream]
  Saving to: `n98-magerun.phar'
  100%[=============>] 2,787,592   9.09M/s   in 0.3s

  #md5sum n98-magerun.phar

  158e64856535f10e2259e9431b81ed82  n98-magerun.phar

  #chmod +x ./n98-magerun.phar

  #./n98-magerun.phar --version

  y?

As you can see, as I try to get the version installed I just get this "y?", as response.

Can someone help me with this please, thanks in advance


texts: How to get sub category id by current category id in magento2

texts:
I want to get sub category id when I click on main category id. For ex. I Click on "Gear" category...Then It will also display sub category's id..

This is block file function :

public function getCurrentCategory(){
$currentId  = $this->_registry->registry('current_category');
return $currentId; // it will return current category id}

This is phtml file :

    <?php
$currentCategory = $block->getCurrentCategory();//I want to here subcategory id?>


texts: How to Integrate 2 Different Magento Store For Products

texts:
We have 2 Magento sites on different domains and servers. We don't use any ERP or backend integration right now.

What i want to do is, i want to integrate this 2 magento store's products, stocks. Basically; everything about products.

So how can we do this?

I searched for extensions, dropshipping solutions and many other things but im confused at this position right now.

Any ideas?


texts:
In Magento 1

I can edit local.xml like so:

<default>
    <reference name="root">
        <block type="core/template" name="above_main" template="page/html/banner.phtml" />
    </reference>
</default>

I can edit a template file like so:

<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>

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

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

        <?php // MY EDIT: ?>
        <?php echo $this->getChildHtml('above_main');

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

This will end up with the file at page/html/banner.phtml being inserted into the template at my own custom position, above_main.

OK, so my question is:

How do I do this in Magento 2?


texts: Cart rule works but one built similar doesn't

texts:
I have a grouped product. When it is added to the cart, three products get added and we offer a 20% discount for the "group". I created a rule and it has worked flawlessly for several years. I went to create another one exactly like it but with different SKUs and it doesn't work.

Definition:

Conditions:

Actions:

Why would the rule work for the Essentials Package but not for the Agency Value Package?


texts: Magento 1.9 How to sort product in category page by stocks product

texts:
I want the products to be displayed on the category page, if available
That is, first those that are stocks , then those that are not stocks
I didn't find anything with the title in the attribute
Is there any code?


texts: an error occurred while processing this directive - after upgrade Magento from 1.5 to 1.9

texts:
Here is my question in stackoverflow: https://stackoverflow.com/questions/26771070/an-error-occurred-while-processing-this-directive-after-upgrade-magento-from-1.

I just updated magento from 1.5 to 1.9 by this way: - Go to magento connect and install package: http://connect20.magentocommerce.com/community/Mage_All_Latest.

After that, I got an error like this: CONNECT ERROR: Package community/Mage_Core_Modules 1.9.0.1 conflicts with: community/Mage_GoogleShopping 0.3.5, community/Ansyori_Autotrans 0.1.0 Package 'Lib_Google_Checkout' is invalid Empty package contents section

And then, when I go to my website, it always gets this error: [an error occurred while processing this directive]

I try many ways: reset permission, change User name but nothings change. Anyone can help me ?


texts: Display Pending Review in Product review

texts:
I want to display pending Review in the product review tab. But I can not found the proper file to remove or edit filter for pending review.
Thank you in advance.


texts: PayPal All-In-One Payment Solution - Clone to multiple options in checkout process

texts:
TLDR; Clone "PayPal All-In-One Payment Solution" payment method to have THREE different payment options in “Payment Method” section of the checkout process.

Magento 2 comes with "PayPal All-In-One Payment Solution" that enables user to pay by PayPal but also by credit/debit card through the same payment method.

When this option is enabled, it shows only ONE payment option in the checkout process. This is understandable, however, I would like to offer more than one payment option in the checkout "Payment Method" section such as "Credit Card", "Debit Card" and "PayPal" which all go to the same place.

In conclusion, my goal is to create two more radio buttons in the “Payment Method” section of the checkout that mimic "PayPal All-In-One Payment Solution" logic.

To visualise my goal:

Current setup:

PayPal Payment ---- [PayPal Method]

Desired result:

Credit Card ---
Debit Card  ----- [PayPal Method]
PayPal      ---

I don't even know where to start so any help or directions will be highly appreciated.

EDIT:

To clarify, I am using the "PayPal All-In-One Payment Solution - Website Payments Standard" which redirect customers to PayPal website to take the payment.

EDIT2:

To avoid further misunderstanding, I do not want to split the payment gateway and I do not want to create separate payment solutions. All I want to have, is “PayPal All-In-One Payment Solution - Website Payments Standard” enabled, however, display THREE options in the checkout step. These three buttons should do the same thing and redirect customer to PayPal. Whichever option is clicked, user gets the same result


texts:
Ajax in amasty layered navigation dont work  with my claue theme. Without ajax - working fine.
Then I click on checkbox or another element , page reloaded without filters.
In store configurations ajax - on .
In console - no errors .
I'm try to debug, but still no luck.
Magento 2.3 , Amasty/shopby latest version, installed by ssh/ftp
Mb someone have the same problems? Or you have ideas or same practice , pls share your idea here , all answers - vote up :)


texts: Fishpig Wordpress Extension not working for multiple store Magento 2

texts:
I have installed Fishpig Wordpress extension for Magento 2.It is working fine for my europe store.But for my other store it shows me 404 page.Can you guys just guide me how to configure the fishpig for multiple store view?

Please check screenshot below,

This is my wordpress database configuration,

Working Fine for the europe store.

Showing me 404 page for deutschland store.

Please let me know if you guys need any additional information.How to fix this issue.Please... its an urgent.
Thanks in advance!!!!!


texts: where to put vendor-modules translation dictionaries?

texts:
I am using Magento 2.0.4 and want to provide translation dictionaries to vendor modules such vendor/magento/module-customer

I have successfully collected the phrases of this module, but don't know where I should put the .csv

Note: I am not going to install a language package, I'm translating each module in isolation.


texts: Why Magento 2 Injecting Interfaces to the constructors?

texts:
I am very new to Magento 2. After reading through some of the classes, I just noticed that there are a lot of interfaces injected directly through constructions. We all know the interfaces are merely method signatures. How does Magento get the concrete method feature by just injecting an interface.

//vendor\magento\module-indexer\Model\Processor.php

public function __construct(
    ConfigInterface $config,
    IndexerInterfaceFactory $indexerFactory,
    Indexer\CollectionFactory $indexersFactory,
    \Magento\Framework\Mview\ProcessorInterface $mviewProcessor
) {
    $this->config = $config;
    $this->indexerFactory = $indexerFactory;
    $this->indexersFactory = $indexersFactory;
    $this->mviewProcessor = $mviewProcessor;
}

And it calls in this method

public function updateMview()
{
    $this->mviewProcessor->update('indexer');
}

How does the interface and it's implementation works?


texts: How to get StockStatus in a block of type Magento\Catalog\Block\Product\View

texts:
I have a block of type Magento\Catalog\Block\Product\View.

I would like to retrieve the current product's stock status.

The products in my eshop are both simple and configurables.

For configurables I guess I would need to know if all children are out of stock or the opposite, if at least one child is instock.

How should I approach this?


texts: Magento2 UI component focusout event not working

texts: I am using ui component for one the form in admin and for one element i am using component js class to trigger some operations on that element, it only gives onUpdate function, is there anything we can do if i want to trigger focusout event instead of onUpdate function? please find below screenshots for reference


texts: Setting a dynamic value for a session variable

texts:
Can any one help me why am not able to set a magento session variable with the following code.

Mage::getSingleton('core/session')->setGiftMessage("<script type='text/javascript'>jQuery('#gift_message').val();</script>");

If the above implementation is wrong then please tell me how can i get a value of a text area

<textarea id="gift_message" rows="2" cols="75" name="gift-message"></textarea>

and set that value in a magento session variable to use it later.

Many thanks in advance .


texts: Can't log into admin area in magento! Need help quick

texts:
I can't seem to get into the admin area in magento. I think it's a cookie issue as the page is just reloading and I've cleared the cache manually, cleared the cookies in my browser but still I'm locked out. Edited the Varien.php and commented the last 3 lines on the cookie (yes I know your not suppose to edit the core code but I'm at a loss here). I really need to get in to it asap. Can I clear the sessions in the sessions folder and will that help?

Hope someone can help


texts: product export from magento 1.9.3 no longer possible

texts:
I started with a magento 1.9.2 installation. It was possible to import/export the products with the magento funtion export/data profile/export all products.

A few weeks ago, I upgraded to magento 1.9.3. When I tried to export all products now I only see a white new tab.

After a few minutes I get an error message

  "unavailable service due to .... or capacity problem"

I use magento 1.9.3 with mariadb 10.0 / plesk.


texts: Magento 2 the product added to cart and check the caer page and also enter the quantity hit the update shopping cartbutton it shows the popup message so i need to know how to implement this where have to check and which file.