texts: Magento cart shows short description twice

texts:
In the magento cart the short description is shown twice.

The code in /app/design/frontend/my_template/default/template/checkout/cart/item/default.phtml
is

<?php if ($_options = $this->getOptionList()):?>

            <?php foreach ($_options as $_option) : ?>
            <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>

<?php echo $this->escapeHtml($_option['label']) ?>

            <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
                <?php if (isset($_formatedOptionValue['full_view'])): ?>

<?php echo $this->escapeHtml($_option['label']) ?>

<?php echo $_formatedOptionValue['full_view'] ?>

                <?php endif; ?>

            <?php endforeach; ?>

        <?php endif;?>

Where is the template file, in which I can edit the short description


texts: Dynamically Get Zip Code on Shipping Form

texts:
I would like to get the zip code after the user is done inputting.
I am using a One Page Checkout for this. I am currently using a code that get the zip code on the user information being saved on the system. By the way I would like to add the code on one of the custom module's model. is this possible?


texts: Not getting order shipping address in magento2

texts:
trying to get the order shipping address Magento 2. I did the below code but not its not getting.

$order = $observer->getEvent()->getOrder();
// order id i am getting correct.
$order_id = $order->getId();
$order->getShippingAddress();

Even tried with by load that order using order but still not getting

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $orderObj = $objectManager->get('Magento\Sales\Model\Order');
 $order_info= $orderObj->load($order_id);
 $shippingaddress = $order_info->getShippingAddress());
 $this->logger->info($shippingaddress);


texts:
I have added an error in the sales_quote_save_before event, if the quantity of items is more than 500.

> Mage::getSingleton('checkout/session')->addError(Mage::helper('checkout')->__('The maximum order qty is %d', 500));

The error appears in the cart, but still I can go further to the checkout and place the order. How can I disable the Proceed to Checkout button?


texts: Layout updates for particular page for particular store

texts:
Is there an official way to update a layout via local.xml only on grouped product pages AND in a particular store?

This would let me update the layout on grouped product pages:

<layout>
    <PRODUCT_TYPE_grouped>
        <reference name="root">
            <action method="addBodyClass">
                <body_class>grouped-product</body_class>
            </action>
        </reference>
    </PRODUCT_TYPE_grouped>
</layout>

This would let me update the layout in a particular store:

<layout>
    <STORE_storecode>
        <reference name="root">
            <action method="addBodyClass">
                <body_class>particular-store</body_class>
            </action>
        </reference>
    </STORE_storecode>
</layout>


texts:
I'm working on this website. The related products are displaying, but the image is not coming below the title. It is moving a bit right. I tried including
. But the look will blow away. Please suggest some modification so that the image comes exactly below. the code goes like this

<?php
    $related_prods = $_product->getRelatedProductIds();
?>

    <?php
    foreach($related_prods as $related){
    ?>

    <?php    $_rel = Mage::getModel('catalog/product')->load($related);
        echo $_rel->getName()."\r\n"."\r\n"."\r\n";

    ?>
        <a href="<?php echo $_rel->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_rel->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_rel, 'thumbnail')->resize(84, 81) ?>" width="120" height="120" alt="<?php echo $this->htmlEscape($_rel->getName()) ?>" />
        &nbsp;
        &nbsp;

<?php
}
?>

Another is that, in that page, in additional information the product is showing the sku code of product. How to make it invisible in admin page.


texts: I have various sizes for my configurable products to display it in order in product view page i used array_reverse for number 1,2,3 so now sizes with numbers are arranged in order.but how to do this in S,M,XL,XS..kindly help me


texts: Also show search results when search string comes close to item names

texts:
I am making a website, with several products. This webshop sells boat trips. I have a few items with the name 'daytrip'. But when I search for 'daytrips', I get no search results at all.

I would like to get results for 'daytrip', when I am looking for 'daytrips'. How to I achieve this?


texts: How to change Tax percentage during checkout

texts:
We would like to change the Tax percentage on my current order during checkout.

Current setup:
Magento 2.1.4
Magestore OneStepCheckout

Current challenge:
We currently ask our customers some questions during checkout, and depending on theyre answers, they need to be given a different tax percentage (or different tax class), instead of standard 21%, they get 6%. On the total order.

Already tried solutions:
Solution 1: I created an observer, sales_quote_collect_totals_before and when fired I change the class of the products. The solution works when adding products to the cart, but when dispatching the event while in checkout, the product tax and total amount is not changed.
Solution 2: How to re-collect quote totals in Magento 2?
But I am not getting it to work.

I hope that, someone has a solution, or is able to point me in the right direction.


texts: Magento2 category page exception log "category.product.type.details.renderers"

texts:
I am getting error in category page it does not display any product
in exception log I found this error

  Magento\Framework\Exception\LocalizedException : The element "category.product.type.details.renderers " already has a child : " configurable "

If I set simple product in category then it is working but if I set configurable product then it does not render any product in category page

Does anyone know this error?

Thanks


texts: Import all Products from magento 1.9 to magento 1.9

texts: I am using magento 1.9.4 . I want to import all Product data from another magento 1.9 store. i tried via .csv file but it did not worked. How can i transfer product from one store to another with all attributes . Is there any Extension to do that ? Guide


texts: How to get the product list from magento 2 using Rest Api which is created within the specific time?

texts: I want to get the products which is created within the specific time like from to time using Rest Api, please help..


texts: Currency: Display price on products in USD but only use EUR for invoices. Magento 1.9 german

texts:
I'm using Magento 1.9 customized german version.

Is it possible to set it so all prices are displayed in USD only.
That means even after putting products in your shopping basket and going through the whole payment procedure everything is displayed in USD. The customer also pays for their purchase in USD too.
But the invoice should only be in EUR (Price should already/automatically converted from USD into EUR).

I hope that you guys could understand what im looking for.
Thanks a lot for your help.


texts: Magento2 How to reload checkout page summary?

texts:
I am using Magento2.1.9 when I am going to the checkout page, order summary reloaded default magento's way so I used a js to our custom module added below code into it

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

After that applied all commands but not working in reload order summary if any one idea reply me I have try to in other stack solution regarding this but not getting success.


texts: Hits from google bot to urls ending with /customer/customer

texts:
When we tail -f access.log, we can see a lot of PLP requests coming from googlebot that contains customer/customer/contactus in it. For example requests are coming like below
catalog/product/view/id/689938/category/5075/customer/customer/contactus
But we dont have a url that ends with customer/customer/contactus. The other parts of the URL is valid . The user agent is googlebot and we have verified that it is real googlebot crawler that crawls the site


texts: Change theme color from admin dashboard in M2

texts: I want to add an input field that will change the main color of the Luma theme. Could someone help me on what should my custom extension include?


texts: Apply coupon in create order by programming magento

texts:
I am successful able to create order by programming but unable to apply coupon in that order.

{

$quote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore('default')->getId());

if ('do customer orders') {
        // for customer orders:
        $customer = Mage::getModel('customer/customer')
                ->setWebsiteId(1)
                ->loadByEmail('customer@example.com');
        $quote->assignCustomer($customer);
} else {
        // for guesr orders only:
        $quote->setCustomerEmail('customer@example.com');
}

// add product(s)
$product = Mage::getModel('catalog/product')->load(8);
$buyInfo = array(
        'qty' => 1,
        'voucher'=>'Testcode',
        // custom option id => value id
        // or
        // configurable attribute id => value id
);
$quote->addProduct($product, new Varien_Object($buyInfo));

$addressData = array(
        'firstname' => 'Test',
        'lastname' => 'Test',
        'street' => 'Sample Street 10',
        'city' => 'Somewhere',
        'postcode' => '123456',
        'telephone' => '123456',
        'country_id' => 'US',
        'region_id' => 12, // id from directory_country_region table
);

$billingAddress = $quote->getBillingAddress()->addData($addressData);
$shippingAddress = $quote->getShippingAddress()->addData($addressData);

$shippingAddress->setCollectShippingRates(true)->collectShippingRates()
                ->setShippingMethod('flatrate_flatrate')
                ->setPaymentMethod('checkmo');

// For coupon applied on this order

//$quote->setCouponCode('test')->setDiscountAmount('10')->setBaseDiscountAmount('10')->setDiscountDescription('your-discount-description');

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

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

$service = Mage::getModel('sales/service_quote', $quote);
$service->submitAll();
$order = $service->getOrder();

printf("Created order %s\n", $order->getIncrementId());
}

Kindly let me know how to apply the coupon code with above code.


texts: Want to display an Image if a customer group has a special price

texts:
I want to display an image in corner of our product images if a customer is logged into a specific group and that group has a special price.

I have got the code for checking whether a customer is logged in and also check what group they are in. and I have got this to add a  if it is true. This is the code I have for this.

<?php
        $_isLoggedIn = $this->helper('customer')->isLoggedIn();
        if($_isLoggedIn == true){
        $_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();
        if($_myGroupId == 5){
        ?>

<?php
                }
            }
    ?>

However, I need another IF statement to check if that product also has a special price for that customer group. I have done this before in the price.phtml using this code

<?php $login = Mage::getSingleton( 'customer/session' )->isLoggedIn(); //Check if User is Logged In
        if($login && Mage::getSingleton('customer/session')->getCustomerGroupId()==5)
        {
        $groupPrices = $_product->getData('group_price');
        $Groupprice= $groupPrices;
            if (is_null($groupPrices)) {
                $attribute = $_product->getResource()->getAttribute('group_price');
                if ($attribute){
                    $attribute->getBackend()->afterLoad($_product);
                    $groupPrices = $_product->getData('group_price');}}
            /* check group price exit nor not */
             if (!is_null($groupPrices) || is_array($groupPrices)) {
                foreach ($groupPrices as $groupPrice) {
                if($groupPrice['cust_group'] == Mage::getSingleton('customer/session')->getCustomerGroupId()){
                $Groupprice = $groupPrice['website_price'];
                 $Groupprice=$groupPrice['cust_group'];
                break;}} }
             /* $Groupprice  is null mean group price is not  exit*/
             if(!is_null($Groupprice)){
           //group price exits ?>
           <?php echo "Your Special Price " ?><?php}?>

But this code doesn't work in the view.phtml. I have had a little play around and I can't seem to get it to work, Could someone help me adding another IF statement to my original IF statement.

If I am not being clear please let me know. and Thank you in advance.


texts:
It's been 4 days already that I'm digging the internet for Magmi alternative for Magento 2.0, since Magmi doesn't have any Magento 2.0 compatible version (or I'm unable to find it).

if anyone of you have experience working with a module or tool in Magento 2.0 for importing/exporting Category and product, could you please share it with me? thank you

take in to consideration that I've already tried using Firebear.


texts: Magento 2 : Fatal error: Uncaught Error: Call to a member function dispatch()

texts:
I get this error in a block that I am developing to get current category. any ideas?

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

protected $_registry;

public function __construct(
    \Magento\Framework\Registry $registry
)
{
    $this->_registry = $registry;
}

public function getCurrentCategory()
{
    return $this->_registry->registry('current_category');
}

  PHP Fatal error:  Uncaught Error: Call to a member function dispatch() on
    null in
   /vendor/magento/framework/View/Element/AbstractBlock.php:652


texts: magento1.9 get login event with observer

texts:
I'm trying to use observers
My goal is to do something after successful login
I wrote this but I think I don't understand something...
What's wrong?
app/etc/modules/Drg_Customeraccess.xml

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

app/code/local/Drg/Customeraccess/etc/config.xml

   <?xml version="1.0"?>
<customer_login>
    <observers>
        <Drg_Customeraccess>
            <type>model</type>
            <class>Drg_Customeraccess/observer</class>
            <method>customerLogin</method>
        </Drg_Customeraccess>
    </observers>
</customer_login>

app/code/local/Drg/Customeraccess/Model/observer.php

<?php
class Drg_Customeraccess_Model_Observer
{
    public function customerLogin($observer)
    {
        $customer = $observer->getCustomer();
        if ($customer){
        echo "nameOBS-".$customer->getFirstname();
        }

    }
}
?>

Thank you


texts:
I have a custom module, through which I can upload multiple images from admin. Along with images, I have text, drop-down form fields in my module. Now I can upload all images to media folder of Magento and can store all form field information in the database. Now when editing my stored item from the grid page, I need to show all the images that correspond to the saved item in my module. How can achieve this? I think the code should come under editAction() in the controller. Any help or hint is highly appreciated. Thanks in advance.

My editAction() is given below. It displays already set form fields except for images while editing the item from the grid page.

<?php
public function editAction()
    {
        $bannerId   = $this->getRequest()->getParam('id');
        $bannerModel =   Mage::getModel('banner/banner')->load($bannerId);
        if ($bannerModel->getId() || $bannerId == 0)
        {
            Mage::register('banner_data', $bannerModel);
            $this->loadLayout();
            $this->_setActiveMenu('banner/items');
            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Banner Manager'), Mage::helper('adminhtml')
                ->__('Banner Manager'));
            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Banner Description'),
                Mage::helper('adminhtml')->__('Banner Description'));
            $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
            $this->_addContent($this->getLayout()->createBlock('banner/adminhtml_banner_edit'))
                ->_addLeft($this->getLayout()->createBlock('banner/adminhtml_banner_edit_tabs'));

            $this->renderLayout();
        }
        else
        {
            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('banner')->__('Banner does not exist'));
            $this->_redirect('*/*/');
        }
    }

EDIT
Kindly note that I have two tabs for my module. Image uploading facility is provided in the second tab. I have used a phtml file for constructing that tab. So image upload field is provided thereby using <.input type="file" /> element. I need to display the uploaded images in this tab itself. So in effect, I need to add code in my phtml file in order to display these images.


texts:
I'm trying show different images on different pages like this:

<?php $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];if (strpos($url,'cart') == true): ?>
Your Cart
<?php endif; ?>

<?php $urlonepage = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];if (strpos($urlonepage,'onepage') == true): ?>
Checkout
<?php endif; ?>

<?php $multishipping = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];if (strpos($multishipping,'multishipping') == true): ?>
Multiple Address Checkout

<?php else: ?>
Everywhere else
<?php endif; ?>

The problem I'm having is I don't want to show the "Everywhere Else" part on any of the other pages. I tried using elseif but I get errors.


texts: Magento2 : Add Store view field in admin

texts: In my site having two stores.I want to show store views select option in custom module in  adminhtml.How to add functionality for that


texts:
In magento1 for any request API, WSDL XML structure can be obtained by giving URL http://192.168.0.183/magento1131/api/v2_soap/?wsdl=1 in SOAPUI, storm or any other wsdl xml request processor.

For the same in magento2, to get the WSDL XML structure for any API request if i type the URL http://192.168.0.183/NewMagento2/soap?wsdl&services=customerCustomerRepositoryV1 ,its giving error.

In magento1 we can get WSDL XML structure like below

but getting below error in magento2

So please let me know how to get magento2 XML structure for any API request


texts: How can I get the second Image of a product in Magento2?

texts:
I want to use the first and the second image of a product, I'm now able to use the first one. But how can I reach the second image?

Does the $_product->getMediaGallery('images') exists in Magento 2?
If not how can I reach the same goal?

I tried to use this:

foreach ($product->getMediaGalleryImages() as $product_img) :
    echo $product_img;
endforeach;

And i recived the following error "Error filtering template: Warning: Invalid argument supplied for foreach() in /var/www/html/magento2/app/design/frontend/XXX/xxx/Magento_Theme/templates/xxxx.phtml on line 27"


texts: How to get Magento version in Magento2 ? (Equivalent of Mage::getVersion())

texts:
How do I get the Magento version in Magento2.x (e.g. 2.0.0) ?

In Magento1.x, I could do it with

Mage::getVersion()

So what's the equivalent in Magento2.x ?


texts: Is there any free EMI calculator extension in Magento 2?

texts:
I like to know is there any free EMI calculator extension in Magento 2?
Thanks


texts: How to get customer billing and shipping information in magento2 .phtml files?

texts:
How to get checkout page information (firstname, lastname, address etc of customer)  ,
I have created one phtml file and the code is below

$address = $objectManager->get('\Magento\Sales\Model\Order');

        echo   $address->getBillingAddress()."
";
        echo   $address->getShippingAddress()."
";

I need to get customer information irrespective of his/her login.
how can I achieve it, thanks.


texts:
The original post is further down but I would like to rephrase it for clarity:

We use both top & left-side navigation on Magento CE and I want to add the MAIN category to our left-side navigation ONLY.

Now, the way things are currently configured (or customized) is when you create a new Main Category and set Visible in Nav to (Yes) it is added to BOTH top navigation & left-side navigation.

Conversely, if you set Visible in Nav to (No) it is removed from BOTH top navigation & left-side navigation.

So how can I show the Main Category in one BUT not the other? I have looked at left.phtml & top.phtml too. Thank you all again in helping resolve this question.

=> Original Post:

Our Magento CE site is customized to show Categories in both the top & left-side menus. So, how do I show a Category ONLY in the left-side menu? I have looked through left.phtml & top.phtml here: /html/app/design/frontend/default/ourtheme/template/catalog/navigation to no avail as well as dozens of other files. I can't seem to figure this out. Can you help me? Thank You.


texts: When I register a customer in the admin I get this warning. There does not seem to be any problem but I don't understand why we get this warning because the first name and last name have been entered. CE v1.9.1.0


texts: is there any way to display all my products in group product on one page in admin dashboard

texts:
Basically this is my group product

and this is how we can see all of child products

Now I dont want that previous and next button i just want all my products in list comes in one page or tab.
help me to solve this problem.


texts: How can I assign an existing simple product to a configurable product using the admin interface?

texts:
I have existing simple products I need to assign to configurable products, however I can't find any interface to do this. This was possible in Magento 1, but I can't see where it is possible in Magento 2.

The only configurations interface I can see will only allow the creation of new products:

Is there a way to associate existing simple products to existing configurable products using the admin interface?


texts: Use Default Value automatically unchecked for all the fields of store when importing products

texts:
I am running a Magento website having 2 Stores

a) store1

b) store2

I am almost using same data for both the stores except Store2 products "Meta titles" are different. So when I update Store2 Products meta_title using default Magento Import/Export functionality, store2 product updated successfully but all the other values of the updated product Use Default Value unchecked.

I searched a lot on google before posting this question but didn't get the solution to the problem.

My Queries :

1) Is Use Default Value uncheck of all values of the store is default behavior of Magento?

2) Is there any solution to fix this issue?


texts: Cannot open blocks, pages via Magento 2 admin

texts:
I have installed Magento 2.3 on xampp. I have tried to check the CMS pages, blocks via admin panel but its not opening instead it says the error

  Attention, Something went wrong

How can I fix this error?


texts: How can i configure magmi and import bulk images

texts: How can i configures MAGMI for my site, and how to use for the bulk images import, and products.


texts:
GET /rest/V1/guest-carts/".$quote_id."/totals
RESULT:
[items] => Array
        (
            [0] => Array
                (
                    [item_id] => 2275060
                    [price] => 22
                    [base_price] => 22
                    [qty] => 1
                    [row_total] => 22
                    [base_row_total] => 22
                    [row_total_with_discount] => 0
                    [tax_amount] => 0
                    [base_tax_amount] => 0
                    [tax_percent] => 0
                    [discount_amount] => 0
                    [base_discount_amount] => 0
                    [discount_percent] => 0
                    [price_incl_tax] => 22
                    [base_price_incl_tax] => 22
                    [row_total_incl_tax] => 22
                    [base_row_total_incl_tax] => 22
                    [options] => []
                    [weee_tax_applied_amount] =>
                    [weee_tax_applied] =>
                    [name] => test2
                )

        )

How can i get SKU in item data response?
Thanks in advanced.


texts: Cron Advanced CSV Product Import Mapping

texts:
I'm wondering how I could map a product CSV import including product attributes etc.

I need the CSV import to run daily via cron, as the CSV file is updated daily with product data.

I also need any products that aren't included in the CSV import to appear as out of stock in Magento.

Any idea what tools are out there that might allow me to do this?


texts:
After migrate the website from localhost to server I see that all image is 404 now and when I see the path I see that product images are path are wrong in everywhere .

Now the path is being call

  pub/media/catalog/productcache/aa0b8856d0d44b2f592207c1826506a3/9/_/9_6.jpg

Where as it need to be

  pub/media/catalog/product/cache/aa0b8856d0d44b2f592207c1826506a3/9/_/9_6.jpg

So what I understand is here is only the slash(/) is missing between product and cache.

I run all command like setup:upgrade , catalog image resize, content deploy .

But nothing solve the issue. Anyone face the same issue before ? Can you tell me how to solve it ?


texts: Best Way To Iterate Through Product Collection

texts:
Which of these methods is "easier" on the Magento platform, specifically the database? Method 1 uses a single call to the database to retrieve the collection, and then iterates over the result. Method 2 retrieves the product inside the loop on each run.

Method 1

$products = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToSelect('*') // <- obv a bad idea
    ->addAttributeToFilter(
        'sku', array('in' => $productSkus)
    )
    ->load();

foreach ($products as $product) {
    echo $product->getName();
}

Versus getting the product object inside the loop:

Method 2

$products = Mage::getModel('catalog/product');

foreach ($array as $key => value) {
    $product = $products->load('PROD001', 'sku');
}

Obviously this code is only a sample. Considering the dataset could contain many hundreds or thousands of products, which method is the "right" way, or is there another I'm missing?


texts: Magento 2 Cannot update specialPrice per website

texts:
I'm trying to update specialPrice per website in a Magento 2.3.6 website. The problem is that when i am updating the price using the Product model , the specialPrice is removed from all storeviews ( prices scope is set to website ), and as a result i have the default websites special price for all my storeviews.
$productInStore= $this->productRepository->getById($productId, true, $storeId);
$productInStore->setPrice($storePrice);
$productInStore->setSpecialPrice($storeDiscount);
$this->productRepository->save($productInStore);

I am able to fix the issue by using the updateAttributes method from \Magento\Catalog\Model\Product\Action.
There are two problems with the above solution

The next time someone tries to save the product using repository / model , the prices are immediately invalidated.
It does not feel right

I've digged in the Magento source and i've found a weird piece of code beeing executed in Magento\Catalog\Model\Product\Attribute\Backend\Price
public function afterSave($object)
{
    /** @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */
    $attribute = $this->getAttribute();
    $attributeCode = $attribute->getAttributeCode();
    $value = $object->getData($attributeCode);
    // $value may be passed as null to unset the attribute
    if ($value === null || (float)$value > 0) {
        if ($attribute->isScopeWebsite() && $object->getStoreId() != \Magento\Store\Model\Store::DEFAULT_STORE_ID) {
            if ($this->isUseDefault($object)) {
                $value = null;
            }
            foreach ((array)$object->getWebsiteStoreIds() as $storeId) {
                $object->addAttributeUpdate($attributeCode, $value, $storeId);
            }
        }
    }

    return $this;
}

As you can see, the line that is causing me this issue is the one bellow
$attribute->isScopeWebsite() && $object->getStoreId() != \Magento\Store\Model\Store::DEFAULT_STORE_ID

Although it doesnt makes sense, let me explain...
I've set the store id to number 2 ( which is the store id / under the website that i want the price to be different ). It checks that the Price attribute is scoped per website, and then it checks if the attribute in the product is 0.
So there is no way to update the price in different store views as long this check exists.
Is there any other way to overcome this issue? Am the one one strugling with this one ? ( did not find any related info around the web )


texts:
We sync our products a lot with 3rd parties to update pricing and stock.  We also have people editing products daily.

This will trigger indexers to run.  The indexers can take 5 hours to run on category products and longer for pricing indexer.

This is unacceptable as it makes our database server maxed out during that entire time.  When our database server is that busy it makes a normal 2s uncached load of a bundle item take 38 seconds.  We lose customers over this constantly.  We have a cache warmer, and cached pages are fine, but it's impossible to precache all pages in our store.

Magento2 is a constant source of pain and suffering.  Is there really no fix to this?  On top of this, it will cause products to appear out of stock after you get over so many items.

Getting stronger hardware barely makes a dent.  We moved from 4GB RAM and 2CPU to 16GB and 4CPU, and yet our indexing is still almost as long.  Note our database is a separate server so that is just for the database.

Other ecommerce stores don't use this indexers system and don't have this problem.  This is a several year project but this might make us switch to another solution.  It's just that terrible.

Is there no way to just remove them entirely or at least make them efficient?  I looked up other people, having similar issues online and it's everywhere.  People testing a new store with 1.4 million items say it takes their pricing indexer 2.5 hours.  People with real stores with much less items taking even longer.

This is not any way we can run a business.  Currently the indexers never finish before other edits are made to trigger them again.


texts: Extension to redirect a Customer to a payment page

texts:
I have just studied Magento developer's guide for about 20 or so minutes. I am doing a simple research to check out how difficult or easy it would be to integrate a system to Magento.
A quick question:
I want to create an extension for Magento Check out page. When a customer opts to pay through say, debit card, the customer will be redirected to a payment gateway page which will take further details of the card, process the payment and redirect the customer back to the Magento page.
Is that possible? Or is it necessary to make an extension which will take the debit card details directly on Magento page?


texts: Excluding a specific category products find the subtotal in shopping cart rule

texts: Please help me to find the subtotal from the shopping cart excluding one specific category product.


texts: how to fetch value from URL and post in form M2

texts:
I have product grid in admin panel where I have edit link too.  Edit link looks like

http://localhost:8888/backend/division/products/productedit/a_id/10/id/26794/

in ui form I need to send this id : 2679 as hidden field so that I can post it save it in database.

Can somebody help how can I do that?

Thanks


texts: Get language switcher in header.phtml file in MAgento 2

texts:
I am trying to get language switcher in header.phtml file.
I tried this code in header.phtml. it doesnt work in magento 2.2version. Kindly help me to resolve the issue

<?php echo $this->getLayout()->createBlock('page/switch')->setTemplate('page/switch/languages.phtml')->tohtml(); ?>


texts: Add custom properties to adminhtml Form Field

texts:
I want to have some custom properties added to a form in admin section. My code is as follows.

    $fieldset->addField('customer_ids', 'multiselect', array(
        'name'      => 'customer_ids[]',
        'label'     => Mage::helper('salesrule')->__('Customers'),
        'title'     => Mage::helper('salesrule')->__('Customers'),
        'required'  => true,
        'values'    => $allcustomers,
        'class'     =>'chosen-select',
        'style'     => 'width: 700px',
        'tabindex'  => '10',
        'data-placeholder' => 'Select customer...,'
        ));

This is not working for the following two attributes,

'tabindex'  => '10',
'data-placeholder' => 'Select customer...,'


texts: Can anybody tell me the complete process of how to create git patches in Magento 2 with example?


texts: Magento 2: Disable past dates for the Datepicker built via ui-component

texts:
I am trying to add a validation to the datepicker so that users won't be able to select past dates. The datepicker is built via ui-component and the code snippet is as follows:

I have checked this link where in they have said to add the javascript in the template file but in our case we don't have any template file.
My case is similar to this post but not getting where to put the javascript.

Any help would be greatly appreciated. Thanks.


texts: Can't override template file in Magento 2.1 module

texts:
I'm trying to override Magento's built-in addtocart.phtml file, but nothing I try seems to be working.

I Have a module named QuantityDropdown under the Rethink namespace. As far as I can see it's installed properly as it displays in the list when I run php bin/magento setup:upgrade and my Setup/InstallSchema.php file properly creates a database table.

I've copied the original file from:

/vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml

...to my local version at:

/app/code/Rethink/QuantityDropdown/view/frontend/templates/product/view/addtocart.phtml

I then created a new XML file to point to my module's phtml file:

/app/code/Rethink/QuantityDropdown/view/frontend/layout/catalog_product_view.xml

which contains:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <referenceBlock name="product.info.addtocart">
                <action method="setTemplate">
                    <argument name="template" xsi:type="string">Rethink_QuantityDropdown::product/view/addtocart.phtml</argument>
                </action>
            </referenceBlock>
         </referenceContainer>
    </body>
</page>

I also updated my module file at /app/code/Rethink/QuantityDropdown/etc/module.xml file to include Magento_Catalog in the sequence:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Rethink_QuantityDropdown" setup_version="0.0.1">
        <sequence>
            <module name="Magento_Catalog"/>
        </sequence>
    </module>
</config>

I've also tried several different XML methods in my catalog_product_view.xml but nothing seems to be working.

Are there any other changes I should be making in the admin panel or are changes just based on the XML files? I feel like I must be missing something.


texts: getProductCollection count after updating filters

texts:
I wrote a little piece of code that shows me the amount of products in a category. However, after applying filters through one of the Amasty extensions, the count is incorrect and stays at the original.

<?= $helper->getCurrentCategory()->getProductCollection()->count(); ?>

That's how the count is shown. Below is the definition of getCurrentCategory().

public function getCurrentCategory(){
    return $this->registry->registry('current_category');
}

Is there any way to update the count after a filter has been applied?

Thanks!


texts: How do I change Magento 2 search from OR logic to AND?

texts: How do I change magento 2 minisearch logic from OR to AND? Right now if I search for 'Shoe laces', it returns all products with terms either 'shoe' or 'laces'. I need fulltext search, so that only product with full term 'Shoe laces' are returned. How do I achieve this?


texts: how to delete catalog price rule after order placed ?

texts:
i want to delete catalog price rule after order placed

how to delete catalog price rule after order placed help of event observer Method


texts: Configurable options (size and color) not load

texts:
Some times Configurable options are not loaded in product detail page and i get this error on console

In firefox I get this error on console:

  TypeError: settings.fotoramaApi is undefined

In chrome i get this error:

  Uncaught TypeError: Cannot read property 'setOptions' of undefined on gallery.js:462

updateOptions: function (configuration, isInternal) {

    var $selectable = $('a[href], area[href], input, select, ' +
        'textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]')
        .not('[tabindex=-1], [disabled], :hidden'),
        $focus = $(':focus'),
        index;

    if (_.isObject(configuration)) {

        //Saves index of focus
        $selectable.each(function (number) {
        if ($(this).is($focus)) {
            index = number;
        }
        });

        if (this.isTouchEnabled) {
        configuration.arrows = false;
        }
        configuration.click = false;
        configuration.breakpoints = null;

        if (!isInternal) {
        !_.isEqual(settings.activeBreakpoint, {} && settings.brekpoints) ?
            $.extend(true, settings.activeBreakpoint.options, configuration) :

            settings.isFullscreen ?
            $.extend(true, settings.fullscreenConfig, configuration) :
            $.extend(true, settings.defaultConfig.options, configuration);

        }
        $.extend(true, settings.currentConfig.options, configuration);
        settings.fotoramaApi.setOptions(settings.currentConfig.options);

        if (_.isNumber(index)) {
        $selectable.eq(index).focus();
        }
    }
    },

I am using Magento 2.2.5, occurs in both production and developer mode.

Configurable options are : size (dropdown) and color (swatches)

If I refresh page or click add to cart error resolve and size, color appears.

How can I debug this issue?


texts: Moving language selector to footer - 1.9

texts:
I am using a variation of the 1.9 RWD theme and I want to move the language selector from the header to the footer. This I can do in local.xml, however, after doing so, the block fails to render on the front end for some reason.

In my local.xml I can remove the store_language reference for the header:

    <reference name="header">
        <remove name="store_language"/>

        ...

For the footer I then add in:

    <reference name="footer">
        <block type="page/switch" name="store_language_footer" as="store_language_footer" template="page/switch/languages.phtml"/>

        ...

This seems to show on the frontend but not actually rendering the block.

With template path hints turned on, on the header before adding the 'remove' line I get this:

Behind the red bits is the drop-down I want to appear in the footer.

However, in the footer, I get this:

I see that the block is being called but it is not being rendered.

Things I have tried: clearing all cache, sessions and reloading again
using 'store_language' instead of 'store_language_footer' in my footer block.
Checking exception/system log for anything helpful

There is nothing I can do to explicitly force the block to be rendered in the template as it is already being 'rendered'.

Does anyone have any idea what is wrong?


texts: Add custom "upload image" option on contact page

texts:
I want to provide a special service to my customers which require an option to upload image on contact page just below or above the message area. Can it be possible ?

thanks


texts: How does Magento 2 work with CSS grunt-autoprefixer

texts:
From looking at a fresh install of Magento 2 (v2.1.8) I see from their Gruntfile.js and package.json files that Magento is using grunt-autoprefixer

This is great, CSS autoprefixers are really useful. But I can't see how to use it with Magento's Gruntfile, does anyone have an idea how it works?
Also, how would this work in production mode on a live environment?  Doesn't Magento2 use use a PHP LESS compiler in production mode, while Grunt is just used for developing with.

Gruntfile.js

/**
 * Production preparation task.
 */
prod: function (component) {
    var tasks = [
        'less',
        'autoprefixer',
        'cssmin',
        'usebanner'
    ]

package.json

"devDependencies": {
    "glob": "^5.0.14",
    "grunt": "^0.4.5",
    "grunt-autoprefixer": "^2.0.0",

I ran grunt autoprefixer and it does not seem to work either.

$ grunt autoprefixer
Running "autoprefixer:setup" (autoprefixer) task
Autoprefixer's process() method is deprecated and will removed in next major release. Use postcss([autoprefixer]).process() instead
File setup/pub/styles/setup.css created.

Running "autoprefixer:updater" (autoprefixer) task
Warning: No source files were found. Use --force to continue.

Aborted due to warnings.

Execution Time (2017-10-29 11:12:01 UTC-0)
loading tasks               145ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 30%
loading grunt-autoprefixer  118ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 24%
autoprefixer:setup          216ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 45%
autoprefixer:updater          5ms  ▇▇ 1%
Total 485ms


texts: Why I need to set layout from admin panel for each category?

texts:
I am creating a custom theme. I want to use 2column-left layout for categories page. If I write something in local.xm it doesn't work at all. I feel it is of no use. but when for a specific category I select a layout e.g. 2columns-left it works perfectly.

my local.xml is as under but it is not working.


texts: How to get order data, ship method & payment method name?

texts: I want to get order date, ship method & payment method name after place order in Success.phtml file.


texts: Update Customer details automatically when custom module data updated

texts:
I have a custom table which holds membership numbers and there corresponding membership type. For example number: 10001, membership_type: Gold.

I have an observer which checks a customers input and assigns the customer to a group based on the membership number the have entered.

In the admin panel I have a member section which lists all membership number and their type in a grid.

What I would like to do is:

When a membership number in the admin panel is deleted or membership type changed, i'd like to update the customer whose membership was amended and change their assigned customer group automatically.

Thanks

Stefan


texts: magento default config values for storeview

texts:
I understand that you can set default store config values by using the syntax

<default>
    <path>
        <to>
            <config>value</config>
        </to>
    </path>
</default>

but i am also pretty certain that it is possible to set default values for individual store views in config.xml also .  Without the need to set manually in admin or by using an upgrade script.

Is it possible?

I have tried

<storecode>
    <path>
        <to>
            <config>value</config>
        </to>
    </path>
</storecode>

but that didnt work


texts: Magento 2 - Allow only to post product reviews by customer who purchased that particular product

texts:
I do not want the customers/guest to let post reviews who did not make a purchase of that product.

for guest users I disable - "Allow guest to write reviews"
for customers/logged in users - how to add a condition to check customer has purchased a particular product at least once?

Those who have purchased a particular product that should be able to post review from a product page.


texts: How we can show Sign up for newsletter at paypal express review page in Magento 2

texts:
We want to show Signup to newsletter at PayPal express checkout page.
How we can show it ?


texts: Magento 2 - remove .html from URL by using .htaccess

texts:
We have some wrong URLs in our store ending with .html. If the user opens such a URL, then the .html should get removed, otherwise the site cant get found.
So I added this rule to my .htaccess file in pub/.htaccess, i also tried the normal .htaccess in the magento root.
<IfModule mod_rewrite.c>

...

############################################
## Remove .html from end of URL

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)\.html$ /$1 [L,R=302]

</IfModule>

But if I enter a URL with .html at the end, then it is still not getting removed.
I want to make it work by using the .htaccess, otherwise I will have to create plenty of URL rewrites by hand.


texts: I am looking for a free event manager extension that can list events in a list instead of a full calendar. and also that event information sent to all the customer, so please recommend the suitable extensions


texts: Magento 2.2.2 does not load store properly and admin url through 404

texts:
Please help me with magento 2.2 installation issue.I have paid two days but no luck.

following are my system specs:
 -
 - Magento : 2.2.2

PHP: 7.1.11-0ubuntu0.17.10.1 (cli) (built: Nov 1 2017 16:30:52) ( NTS )
MySQL: 5.7.20
Server version: Apache/2.4.27 (Ubuntu), Server built: 2017-09-18T15:05:48

etc/php/7.1/php.ini :

mode_rewrite enabled
max_execution_time = 1800
max_input_time = 1800
memory_limit = 2048M
upload_max_filesize = 2048M
max_file_uploads = 2048

A fresh installation with sample data is succeeded but my store is not loading properly (seems js/css not loading) and other links (about us, contact us etc) returns 404 admin URL also returns 404 as well.

I have used almost everything

127.0.0.1 instead of localhost for store and admin url
changed app/etc/di.xml (Symlink to Copy) removed everything from pub/static except .htaccess
php bin/magento setup:static-content:deploy
php bin/magento cache:flush
php bin/magento indexer:reindex


texts: How to diagnose “Invalid block type ..” error?

texts:
Not sure what's wrong with this, have been googling around but cannot find a solution, hopefully someone can help me here.

  exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Catalog_Block_Layer' in app/Mage.php:563
  Stack trace:
  #0 app/code/core/Mage/Core/Model/Layout.php(469): Mage::throwException('Invalid block t...')
  #1 app/code/core/Mage/Core/Model/Layout.php(411): Mage_Core_Model_Layout->_getBlockInstance('catalog/layer', Array)
  #2 app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('catalog/layer', 'catalog.leftnav')
  #3 app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('catalog/layer', 'catalog.leftnav')
  #4 app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Mod    el_Layout_Element))
  #5 app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
  #6 app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks()
  #7 app/code/core/Mage/Catalog/controllers/CategoryController.php(146): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
  #8 app/code/local/Xprime/Category/controllers/CategoryController.php(75): Mage_Catalog_CategoryController->viewAction()
  #9 app/code/core/Mage/Core/Controller/Varien/Action.php(420): Xprime_Category_CategoryController->viewAction()
  #10 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
  #11 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_    Http))
  #12 app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
  #13 app/Mage.php(640): Mage_Core_Model_App->run(Array)
  #14 roa/index.php(80): Mage::run('en_roa', 'store')
  #15 {main}


texts: Magento2 - create new/update category programmatically for specific storeView not working

texts:
When I try to update a category category name programmatically only for StoreView 2, it does not work.

The changes will go to StoreView 1 every time and not to the StoreView that I defined:

    use \Magento\Framework\App\Bootstrap;

    include('app/bootstrap.php');

    $bootstrap = Bootstrap::create(BP, $_SERVER);
    $objectManager = $bootstrap->getObjectManager();
    $category = $objectManager->get('\Magento\Catalog\Model\Category')->load(78);

    $d["updated_at"] = "2016-10-14 10:22:34";
    $d["entity_id"] = "78";
    $d["psl_wawi_cat_id"] = "42";
    $d["position"] = "10";
    $d["is_active"] = "1";
    $d["store_id"] = "2";
    $d["store"] = "2";
    $d["storeid"] = "2";
    $d["is_anchor"] = "1";
    $d["name"] = "TESTA-1_ENG";
    $d["custom_design_from"] = "";
    $d["custom_design_to"] = "";
    $d["include_in_menu"] = "1";
    $d["default_sort_by"] = "";
    $d["path"] = "1/2/74/78";
    $d["level"] = "3";
    $d["url_key"] = "testa-1-eng";
    $d["attribute_set_id"] = "3";
    $category->setData($d);
    $category->setStoreId(2);

    $categoryFactory=$objectManager->get('\Magento\Catalog\Api\CategoryRepositoryInterface')->save($category);

After running this script the name of the category is "TESTA-1_ENG" in StoreView 1 but not in StoreView 2.
StoreView 2 still has the original name from the create process.

I think this may be a bug?
Every save process will only affect StoreView 1 and not to the StoreView that I defined.


texts: No able to download system.log through FTP connection

texts:
I open files of a site in Magento 1.9 through Notepad++ with plugin for FTP connection. I don't try to download system.log file.
The error is the following:

Download of /balmain/var/log/system.log failed

Can you help me, please?


texts: Defining observers with custom method names

texts:
Apparently, setting a custom observer method name could be done in magento1:

<event name="controller_action_catalog_product_save_entity_after">
    <observers>
        <some_product_save>
            <type>singleton</type>
            <class>Some\Module\Observer\Products</class>
            <method>doSomething</method>
        </some_product_save>
    </observers>
</event>

But in magento2, method attribute is considered invalid

Hence, how do I define an observer custom method name ?

FYI, I don't want to use execute method because I think being forced to define N files/classes to listen to different events of the same resource would lead to an incredibly stupid amount of useless code (like 40 lines per class definition for only 5 lines of actually useful execute definition), considering that each class would need exactly the same context initialization.


texts: I need redirect customer after payment for onepage/failure, case payment failure.


texts: How can I show "Only X left" on configurable products on Magento 2.2.8?

texts: I want to know how I can show the function "Only X left" on configurable products on magento 2. I've tried so many ways, but nothing works. I see how to do this to M1, but nothing to M2.


texts: How to get cart items id except configurable product

texts:
I have add a configure product in magento store which has associated products( simple and downloaded both) in admin. From frontend I add simple associated product in cart and get cart items information using following code:

$cart_items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
foreach( $cart_items as $items )
{
   $items->getProductId();
}

At this time there is only one product in cart ( simple associated product ) but above code return id "95" and "96" where 95 for configurable product and 96 for simple associated product.

How to get only simple associated product id?

Thanks in advance.


texts: Extension with many to many relationship with products

texts:
I'm new in magento.
i need to create an extension which allows to:

Create an entity composed of title, description and image.
in the product admin, create a new tab which allows to link the product
to one or many new created entities.
the joining table should
contain two orders column.

Is there a similar Magento extension from which i can start to create mine?
Thank you


texts: Set "New Order Status" to processing instead of pending

texts:
I would like orders with payment type banktransfer and cashondelivery to have the order status "Processing" but it only let me choose "Pending". Magento only allows an order status with state "new" but I would like one from state "processing".

Currently I need to manually change the order status for every order. How can I change this?


texts: Can I customise only product details page without creating any child theme? I just want to modify the product image on the detail page.


texts: Display Both original price and custom price at manual order creation for customer

texts:
After entering the custom price at the stage of admin create manual order, the products original price removed when entering the custom price, I need both an original price and custom price. how to display original price near the custom price.

  Note: Checkout takes custom price, An original price needs to display.

  Note : original price: $500 should display for my reference

How can i display both custom price and original price of products at the backend.


texts: Website Payments Standard won't allow Order Review (5th Step)

texts:
We are using Magento 1.9.1.1

We are setting up Website Payments Standard, and we want people to review their orders before going out to the PayPal website.

However, on Step 4 in the Checkout, when people select PayPal as a payment method, and click Continue to Step 5 (Order review), they are taken off to PayPal, without being able to carefully review their orders in Magento.

This is kind of frustrating, and we don't seem to find a way to fix it.

We tried to select "Skip Order Review Step" to "No", but it looks like that is an inner PayPal step, nothing to do with the classic 5th step in Magento's Checkout process.

Do you know how we can get that Step back?

It works when selecting other payment methods like Credit Card (saved) and Check/Money Order.

Thanks,

EDIT

On this video, strangely enough, they have it working: https://www.youtube.com/watch?v=mNukAPvmiQE

It seems like their Magento version doesn't merge Website Payments Standard with Express Checkout, like you have in the lattest 1.9.1.1.

Could this be the culprit?

We have disabled Express Checkout on the product and the Cart though, and it does not makes a difference.


texts: getting error after creating multiple store

texts:
After done configuration as per the link http://www.templatemonster.com/help/magento-how-to-set-up-and-manage-multiple-stores.html#gref

I am getting below error,

C:\wamp\www\magento\books../app/Mage.php was not found

Please help me in this

Code inside books folder index.php file below

<?php

if (version_compare(phpversion(), '5.3.0', '<')===true) {
    echo  '

Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.3.0 or newer.
Find out how to install
 Magento using PHP-CGI as a work-around.

';
    exit;
}

/**
 * Compilation includes configuration file
 */
define('MAGENTO_ROOT', getcwd());

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}

$mageFilename = MAGENTO_ROOT . '../app/Mage.php';
$maintenanceFile = 'maintenance.flag';

if (!file_exists($mageFilename)) {
    if (is_dir('downloader')) {
        header("Location: downloader");
    } else {
        echo $mageFilename." was not found";
    }
    exit;
}

if (file_exists($maintenanceFile)) {
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}
require MAGENTO_ROOT . '/app/bootstrap.php';
require_once $mageFilename;

#Varien_Profiler::enable();

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

#ini_set('display_errors', 1);

umask(0);

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

Mage::run($mageRunCode, $mageRunType);


texts:
Using data-migration-tool i managed to migrate my m1 data into m2.
I referred below link.
https://www.cloudways.com/blog/migrate-from-magento-1-to-magento-2/

I downloaded the migration tool inside the m2 directory and it worked well.
Where my M1 files also on same server. Both DB also in same server.

My Questions are Does it work if :

I download migration-tool-kit to some new directory instead of downloading it into M2 directory?
Are both M1 and M2 files should be in same server? Does it work if both files are in different servers?
Both M1 and M2 Database should be in same server? Does it work if connection string of M1 and M2 are different?


texts: Add Custom Options to an Old Order Record

texts:
My employer uses custom options on an order to store some date that is pulled from a SugarCRM module.

For example, there is a custom option on an order which holds all the colors, one for a size, and a couple other options.

I have built a Printable work order/report outside of Magento...it uses Magento but is not an Extension.

I now need to add the ability to add in these custom options for the old orders in the system.

So I just need to learn how to add a custom option to an old order?  Any help would be appreciated, I haven't been able to find much so far and I am pretty new to magento.

UPDATED DETAILS

To clarify more, below is an image from the Magento Admin panel for an actual order that is placed.

In the left column you will see the Custom Order Options please note these are not Product Options but specific to an actual Order only!

I will list the Custom Order Options available for this order...

Custom Neon Products SKU

Custom Image

Custom Size

Flashing

Price

Total Price

Sign Size

Sign Type

Outdoor

Please also note that there are actually more Custom Order Options available but only the options that have a value set for this order show up and are added to the actual database table for this order.  Some other options that are available but are not set on this particular order are...

Description

Colors

Backing Type

The order image...


texts: I would like to know if there is an option in the backend where I write the name of a product in the search and it shows me in mini images the products with that name before I search, or would it have to be by module? Could someone give me a light? If it is by module what files I will need to create it


texts: Magento 2 check if invoice has been made for shipment

texts: How to check if the particular item of shipment has invoice or not. In Magento 1.9 the data of shipment was saved in 'sales_flat_invoice_comment'. But in 2.1 there is no link. How to get the information that the specific item of shipment has invoiced or not?


texts: Pages that Magento 2 frontend comprises of

texts: I am trying to understand Magento frontend. I stuck at a question that the types of pages are available for frontend. I mean to say like pages -product grid page, checkout page. I want to know all the available pages.


texts:
So we have created a coupon via the admin panel for free shipping.

It's a specific coupon "free" andhas a condition that the shipping country is the "United States".

The problem is that if a non logged in customer with no address history applies the coupon via the discount box on /checkout/cart/ they get an error message saying the coupon is not valid.

The issue is that they have't been identified by Magento as having "United States" in their shipping information.

We also have hidden the shipping and tax estimator block from this page, but for debugging purposes, we re-enabled it, and than the coupon works only AFTER a customer clicks get a quote, then applies the discount code.

Seems like an issue with default magento coupon rules processing.  Any ideas?


texts: Model save using setData and addData not adding to database

texts:
I have a model and I was trying to add a model to the database. When I execute the php script to add everything works fine and no exception are thrown. But the data is not added to the database, which i verified with mysql.

I tried to track the mysql queries and find that in both the cases, setData and addData, Magento is calling an Update command not Insert command. Why is it behaving like this? Is it possible that this behaviour is because of model implementation?

Code snippet to add data -

$data = array('appid'=>'new_appid','custid'=>1,'info'=>'info');
$model = Mage::getModel('interface/data')->setData($data);

try {
    $insertid = $model->save()->getId();
    echo "Data Succesfull inserted. Insert Id : ".$insertid;
}
catch (Exception $e){
    echo $e->getMessage();
}


texts: Magento Retrieve products from second website

texts:
I am trying to retrieve  products related with my second website with the following code

$_products_collection = Mage::getResourceModel('catalog/product_collection');
$_products_collection->addWebsiteFilter(2);
$_products_collection->setStoreId(16);
$_products_collection->addAttributeToSelect("*");

The problem is that this collection include only the products that are in website 1 and 2. What i am doing wrong and i can't get products that are only related to the second website?


texts:
Any time I try to add images to a product in Magento 2.1 I get the following error:

Attention: We don't recognize or support this file extension type.

It does not matter what type of image I attempt to upload. I went through the whole list of supported file types. I tried it with a simple product and with a configurable product.

Does anyone know how to fix this issue? This question was asked before here but the answers misunderstood the question and are not helpful.


texts:
I would like to show some of the colorful banner images for customers login/sign in pages. So, I have to create cms static block section to upload the banners and the same will be shown in front end. I tried to use content.top or columns.top for calling cms static block but it's not show anything in the front end.

<referenceContainer name="content.top">
    <container name="login.banner" htmlTag="div" htmlClass="banner-view">
        <block class="Magento\Cms\Block\Block" name="login-info">
            <arguments>
                <argument name="block_id" xsi:type="string">login-banner</argument>
            </arguments>
        </block>
    </container>
</referenceContainer>

Any help much appreciation.

Edit I would like to show this banner as like how category page banners are works. The banner should be shown before the page title section.


texts: How to create customer custom attribute for radio buttons in magento 2

texts:
I want to create customer custom attributes with following types:
1.radio buttons
2.checkbox

Please provide me a solution to create customer custom attribute.

If the checkbox contains more than 3 options, then how the Boolean type is work.


texts: Custom error message for invalid promo code

texts:
I needed to edit the "invalid promo code" error as it is a valid code, it's just they need to be logged in to use it. Since our login (within the cart) is designed on the next page, it really wasn't working out wording wise.

I edited:

$this->__('Coupon code "%s" is not valid.', Mage::helper('core')->escapeHtml($couponCode))

to this....

$this->__('This coupon code "%s" can not be applied now or it may require you to <b>login or register an account</b> to use it.', Mage::helper('core')->escapeHtml($couponCode))

However: is that safe for future upgrades? And how do I make "login" and "register" links? After I added the html the page went white so I had to just bold those words for now.


texts: Magento 2 reindex price/clear cache for specific products

texts:
I am having some issues doing this programmatically - I have tried a few methods but the price before the change remains.

Basically, I want to reindex pricing for a select number of products, and then clear cache so the new price will display immediately.

The code reindexes individual products - but cache remains uncleared (old price still visible on category page/product page):

$ids = array_unique($ids);
/* \Magento\Indexer\Model\Indexer */
$indexer = $this->_indexer->load('catalog_product_price');

if (!$indexer->isScheduled()) {

    $indexer->reindexList($ids);
}
foreach ($ids as $id) {
    $product = $this->_product->loadByAttribute('entity_id', $id);
    $identities = $product->cleanCache();
    foreach ($identities as $identity) {
        /* \Magento\Framework\Indexer\CacheContext */
        $this->_cacheContext->registerEntities($identities, $ids);

        /* \Magento\Framework\Event\ManagerInterface */
        $this->_eventManager->dispatch('clean_cache_by_tags', ['object' => $this->_cacheContext]);
}

I have gone through a few variations of the above, none with the desired result.

This code causes an error:

  /* \Magento\Catalog\Model\Indexer\Product\Price */
  $this->_priceIndexer->executeList($ids)

Error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '758-0-    1' for key 'PRIMARY', query was: INSERT INTO `catalog_product_index_price_tmp` SELECT `catalog_product_index_price_final_tmp`.`entity_id`, `catalog_product_index_price_final_tmp`.`customer_group_id`, `catalog_product_index_price_final_tmp`.`website_id`, `catalog_product_index_price_final_tmp`.`tax_class_id`, `catalog_product_index_price_final_tmp`.`orig_price` AS `price`, `catalog_product_index_price_final_tmp`.`price` AS `final_price`, `catalog_product_index_price_final_tmp`.`min_price`, `catalog_product_index_price_final_tmp`.`max_price`, `catalog_product_index_price_final_tmp`.`tier_price` FROM `catalog_product_index_price_final_tmp` WHERE (entity_id in (139, 1204, 748, 1026, 1027, 758, 1030, 1031, 1043, 788, 927, 928))"


texts: Converting Magento 1 to Magento 2 on same server

texts:
I'm preparing to move my Magento 1 store over to Magento 2, but in order to avoid issues or conflicts down the road, I would like to setup Magento 2 on the same server my Magento 1 store is currently on.  I know it's possible, and that many people would say it's a security risk, but I wouldn't think that's a problem if I don't plan on running the Magento 1 version any longer after the M2 is setup.

I'm trying to figure out the best way to approach this. Would it be best to setup an entirely new document root for the M2 site? Or would it be best to just create two folders within a single document root, i.e. public_html/sites/magento1 and public_html/sites/magento2? I guess I'd like to know which method would ultimately make it easier to set the Magento 2 site as my live site when it's ready to go.

I don't currently have root permissions on my VPS, but can easily ask my host to set it up for me if two document roots is the best way to approach it.


texts: How to show all customer grid list in our custom admin form in magento 2?

texts: I want to show all customer list in our custom admin form. so how to get this customer grid list in our form?


texts: Gettting banner slider to show in between the navigation and content

texts:
I have installed the free extension Banner Slider from magestore, and it works great so far.

I positioned the slider via the backend in the menu-bottom position.

This position is exactly where i want it, but the problem is, here it shows on every page rather then just the home page like i want it too.

Can any of you guys point me in the right direction?

I have tried various positions to no avail. I have added the line of code to the cms home page content, but this is an incorrect position because the left column shows next to the banner rather then beneath it.

I have also tried using the line of XML code they provided to directly hardcode it in. I put this line of code in the page.xml file in between breadcrumbs and the header blocks, and then set the slider position to custom. but again this has not worked.

Any ideas appreciated thanks.


texts:
I am using below mention code for restrict attribute character length using substr function

foreach ($this->getItemsAsArray() as $item){

            echo '
'. substr($item['label'],0,25) . '' . $item['count'] . '
';
        }

but my problem is i need .. if attribute have more then 25 character i don't know how to add if condition for this.


texts: How do I change the Magento website that a customer is related to?

texts:
We have a multi-store 1.19ce setup.  Two stores, retail and wholesale.

What we need is customers specific to each store only, not shared.  Registration for both stores is only allowed in retail store. If customer applies for wholesale status after they have registered in retail store, they can fill out a form and we then approve them.  At this point we need to go to customer account config and assign them to wholesale store only.  However when we try to do that it is greyed out and wont let us change the website.

If I set customer configuration to global, the customer can login to both stores.  When I set the customer config to per website, the customers cannot login at all on either store.

If a customer registers for a normal account on the retail store and if I have the global customer config set to per website as default, then after they register they cannot login. When I set default customer config back to all, they can login. Totally confused here.

Can anyone share some ideas on how to do this with Magento CE?

Thanks.


texts:
I'd like to add another button in the backend on the cms page edit view. So I've created a module (with the help of: https://community.magento.com/t5/Programming-Questions/Overriding-a-block-in-Magento-2/m-p/6831):

app/code/Company/Modulename/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Company_Modulename" schema_version="0.0.1" setup_version="0.0.1">
        <sequence>
            <module name="Magento_Cms" />
        </sequence>
    </module>
</config>

app/code/Company/Modulename/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Cms\Block\Adminhtml\Page\Edit" type="Company\Modulename\Block\Adminhtml\Page\Edit" />
</config>

app/code/Company/Modulename/Block/Adminhtml/Page/Edit.php

<?php
namespace Company\Modulename\Block\Adminhtml\Page;

class Edit extends Magento\Cms\Block\Adminhtml\Page\Edit {

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

        $this->buttonList->add('Test',[
            'label' => __('Test')
        ]);
    }
}

And added it to the app/etc/config.php file: 'Company_Modulename' => 1

But this gives me an error:
Fatal error: Class 'Company\Modulename\Block\Adminhtml\Page\Magento\Cms\Block\Adminhtml\Page\Edit' not found in C:\git-projects\magento2\app\code\Company\Modulename\Block\Adminhtml\Page\Edit.php on line 4

Do I need to reference to something else, because the app/code/Magento/Cms/Block/Adminhtml/Page/Edit.php file starts with:

namespace Magento\Cms\Block\Adminhtml\Page;
class Edit extends \Magento\Backend\Block\Widget\Form\Container

And is this the cleanest way to accomplish this in Magento 2?


texts: Switching Between Different Prices With Different Currencies And StoreViews Upon Customer Login

texts:
Please suggest something for the following scenario:-

I have two store views: AUStoreView and NZStoreView
I have two currencies: AUD For AUStoreView and NZD For NZStoreView
I have to maintain two prices for each Product i.e Price For AUStoreView(in AUD) and Price For NZStoreView(in NZD).
After successful login by customer:

Check Customer Address
If customer belongs to Australia then:

Must be redirected to AUStoreView if he/she is on some other store view.
Currency must be switched to AUD
For each product, the Price for AUStoreView(in AUD) must be used when product added to cart.

If customer belongs to NewZealand then:

Must be redirected to NZStoreView if he/she is on some other store view.
Currency must be switched to NZD
For each product, the Price for NZStoreView(in NZD) must be used when product added to cart.

Issue is that, how can we maintain two different prices with different currencies for a single product ?


texts: I m very new to magento. Can you please tell me? How can i delete configurable product attributes that i have marked in image

texts:
[![enter image description here][1]][1]I am using Magento 2.3.2. I want to delete those two attributes that I have marked. I googled it but did not find any solution.

https://i.stack.imgur.com/mJULS.png - store->Attributes->Products
 https://i.stack.imgur.com/2vYgS.png - on product page configuration section


texts: Magento 2 How to restrict customer registration country bases

texts:
In magento 2.2.3 SPAM customer registration is pain, and also enabling capatcha is drooping sales.

Can we restrict customer registration country / IP bases?


texts: Magento 2: Checkout Page Remove Last Name and Merge Last Name field value to First Name

texts:
On the checkout page, I want to remove the Last Name field and Merge the Last Name field value with the First Name field.

I have checked Magento Stack Exchange answer, but it removes the field from Registration and edit address page.


texts: Image Clarity Loses When Product Detail Page Is Loaded - Magento 2

texts:
Sometimes when we load the product detail page, Product image size of 100x100 is loaded from cache. The product main image seems to be blurred.
Can someone please help me to resolve this?

Shop URL - http://b2bdev.globalfootcare.com.au/


texts: How to get cart price rule collection in magento 2?

texts: I want to show cart price rule on product page. How to get collection of cart price rules?


texts: How to write code to delete customer group and assign the customers in it to default customer group?

texts:
I have created Customer group using InstallData.php in

  app/code/Mymodule/setup

I need to delete it programatically.How should I do it?
I added UpgradeData.php inside Setup folder.

<?php

namespace <Mymodule\Customer\Setup;

use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class UpgradeData implements UpgradeDataInterface
{
    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        if (version_compare($context->getVersion(), '1.1.0', '<=')) {
            $setup->getConnection()->query("DELETE FROM customer_group WHERE customer_group_id = '4'");
      //  $sql = "Delete FROM " . $tableName." Where emp_id = 10";
//$connection->query($sql);
        }

        $setup->endSetup();
    }
}

But it is not working.Help me out.


texts: Login to magento back office will not work

texts:
Please help

website working fine.

The data file is not able to access admin panel for website itself.  Issue with the mapping so we still cannot access the websites back office in magento.

If anyone can help please


texts: Problem with subtotal in Magento it's adding variants together

texts:
I've been trying to figure this out for a few hours now and it's just dawned on me so on my site i'd have a product say for £159.00 and my grand total was showing up as daft amounts like £932,535.00 so i typed in on a calculator 932,535.00/159.00 which gave me the answer of 5865 i did this with a few products and started noticing a pattern that number adds up to my variants see screenshot below any idea why magento is doing this.

This is also what the backend for the products look like


texts: Magmi v0.7.22 import while image name include "fußballschuhe" "ß" disappear front

texts:
Magmi v0.7.22 import while image name include "fußballschuhe" "ß"(like "cap kinder weiß-563tjs.jpg", "mundial kinder weiß-442bqx.jpg") disappear front,can't import success.the other image name include english style appear well front.anyone can help me,i use the magmi import product with my site sale eruo country.that Germany Czech Language image name will in that situation.

and i can use the magento back import them all well.the magmi i use can't import the image name that include "weiß"  or other character likely Germany Czech Language.
@Dweeves


texts:
What is the best way to redirect/rewrite url in Magento?

What we have are old page (urls) (not from a Magento system):

www.outdoorequipped.com/info/Asics

And to this url it needs to rewrite or redirected:

www.outdoorequipped.com/active/asics/

I tried many things, but it not works for us:

I tried the URL Rewrite Management from Magento
In htaccess I have

Redirect 301 www.outdoorequipped.com/info/Puma https://www.outdoorequipped.com/

and I tried

RewriteRule https://www.outdoorequipped.com/info/Asics https://www.outdoorequipped.com/active/asics [r=301,nc]

But nothing is working.

What I can check and do else?


texts: Invalid credentials for magento/module-store

texts:
After creating my auth.json file  and adding the credentials:

{
  "http-basic": {
    "repo.magento.com": {
      "username": "publickey",
      "password": "privatekey"
    }
  }
}

and doing a composer install, and I am receiving this message:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 379 installs, 0 updates, 0 removals
  - Installing magento/module-store (100.2.8): Downloading (connecting...)

  [Composer\Downloader\TransportException]
  Invalid credentials for 'https://repo.magento.com/archives/magento/module-store/magento-module-store-100.2.8.0.zip', aborting

any idea what am i missing ?
Thnx


texts: Why does the declarative notation return strings when integers are passed?

texts:
This in a template file:

<script type="text/x-magento-init">
    {
        "*": {

            "component": {
                "my_config" : "<?php echo 0; ?>"
            }

        }
    }
</script>

will be transformed to a string in the component javascript file. This is really annoying because 0 is not a falsey value in js, so:

if(config.my_config){ ... }

will not work. This is just an example, there are others where you want to make sure you return integers and you lose time trying to debug what's happening.


texts: Is the order status closed if I make a partial refund for an order using points?

texts:
i knows that if you make a partial refund, the order status will be complete.
But why is it closed when I partially refund an order using points?


texts: Getting cart Items that have reached to checkout

texts:
I need to fetch the

products of a customer that have reached to checkout + the products that customer has placed ordered for.

The collection should not include the items that are in the cart but the customer has not visited the checkout page , so in short

$products = previously ordered product + products that the customer has viewed on checkout page


texts: M 1.9: Data from Block to be passed into phtml

texts:
In phtml I have a simple form with a submit button.
Upon submit a function within my block is called (via form action) and retrieves data from the db.
How can I send the result back to the phtml or directly into the formfields?

<form method="post" action="<?php $this->myFunction(); ?>">
First name:

<input type="text" name="firstname">

Last name:

<input type="text" name="lastname">

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

 <?php
class Marc_MiniBlog_Block_List extends Mage_Core_Block_Template {

    function myFunction() {
        $resource = Mage::getSingleton('core/resource');
        $readConnection = $resource->getConnection('core_read');

        $query = 'SELECT * FROM ' . $resource->getTableName('catalog/product');
        $results = $readConnection->fetchAll($query);

        return($results);}}


texts: What happened to the "Apply to" feature on product attributes in Magento 2?

texts: In Magento 1, product attributes have a setting called "Apply to" where you can set the product types for which the attribute will be visible (simple, configurable, etc).  However, I don't see it anywhere in Magento 2.


texts: How to override fotorama.js Magento ver. 2.2.5

texts:
Is there a way to remove the product name below the product image on the product detail page?

How to override fotorama.js?

Thanks,
JM


texts:
In my current job we control the menu from a static block. But I didn't build or edit this.

I am building my own site and want to use the same feature. But i'm not a PHP Dev

I did look at this ticket How to use custom navigation menu instead of categories menu

and I did edit the file here app/design/frontend/rwd/default/template/page/html called topmenu.phtml

I removed this code

<?php if($_menu): ?>

        <?php echo $_menu ?>

and added my own static block code  {{block type="cms/block" block_id="top-menu"}}

But it doesn't work.. this code just appears as code on the top of the page.

This is what the code I have looks like now on the topmenu.phtml page

<?php $_menu = $this->getHtml('level-top') ?>
{{block type="cms/block" block_id="top-menu"}}

What can I do to give this ?

Thanks.

EDIT
Just to be clear.

I've added normal HTML code to my static block. The issue is making the static block and the html account appear in the menu.

I've not added PHP code anywhere. I've removed the following code from the topmenu.phtml page

<?php if($_menu): ?>

        <?php echo $_menu ?>


texts: magento 2 breadcrumbs swapping in product page

texts:
Hi here am adding breadcrumbs but in product page its adding swap catagery.

until catagory its working good

in product page its swapping category that should not be added

this is my module.xml

<?xml version="1.0"?>
<page>

    <referenceBlock name="breadcrumbs" remove="true" />
    <referenceContainer name="page.top">
        <block class="Harrigo\EverCrumbs\Block\Evercrumbs"
        name="evercrumbs" as="evercrumbs" template="Harrigo_EverCrumbs::evercrumbs.phtml" />
    </referenceContainer>

</page>

this is my evercrumbs.phtml file

<?php $crumbs = $block->getCrumbs(); ?>
<?php if ($crumbs && is_array($crumbs)) : ?>

        <?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
            <li class="item <?= /* @escapeNotVerified */ $crumbName ?>">
            <?php if ($crumbInfo['link']) : ?>
                <a href="<?= /* @escapeNotVerified */ $crumbInfo['link'] ?>" title="<?= $block->escapeHtml($crumbInfo['title']) ?>"><?= $block->escapeHtml($crumbInfo['label']) ?>
            <?php else: ?>
                <?= $block->escapeHtml($crumbInfo['label']) ?>
            <?php endif; ?>

        <?php endforeach; ?>

<?php endif; ?>

this is layout file catalog_product_view.xml

public function getCrumbs()
        {
                $evercrumbs = array();

                $evercrumbs[] = array(
                        'label' => 'Home',
                        'title' => 'Go to Home Page',
                        'link' => $this->_storeManager->getStore()->getBaseUrl()
                );

                $path = $this->_catalogData->getBreadcrumbPath();
                $product = $this->registry->registry('current_product');

                $categoryCollection = clone $product->getCategoryCollection();
                $categoryCollection->clear();
                $categoryCollection->addAttributeToSort('level', $categoryCollection::SORT_ORDER_DESC)->addAttributeToFilter('path', array('like' => "1/" . $this->_storeManager->getStore()->getRootCategoryId() . "/%"));
                $categoryCollection->setPageSize(1);
                $breadcrumbCategories = $categoryCollection->getFirstItem()->getParentCategories();
                foreach ($breadcrumbCategories as $category) {
                        $evercrumbs[] = array(
                                'label' => $category->getName(),
                                'title' => $category->getName(),
                                'link' => $category->getUrl()
                        );
                }

                $evercrumbs[] = array(
                                'label' => $product->getName(),
                                'title' => $product->getName(),
                                'link' => ''
                        );

                return $evercrumbs;
        }

catalog_product_view.xml

<?xml version="1.0"?>
<page>

    <referenceBlock name="breadcrumbs" remove="true" />
    <referenceContainer name="page.top">
        <block class="Harrigo\EverCrumbs\Block\Evercrumbs"
        name="evercrumbs" as="evercrumbs" template="Harrigo_EverCrumbs::evercrumbs.phtml" />
    </referenceContainer>

</page>

can i get help to solve it ? Thank you in advance


texts: I import more than 2000 products in magento but I have a problem, I don't know what is the reason but now at the end of each sku appear _1 is there any way to remove this for all skus?


texts: Wrong price for configurable product in cart

texts:
I'm currently using Simple Configurable Products on my site but am having a few with displaying the correct price on the cart

I have a configurable product which has say three simple products within it with different prices.
The price on the product page displays correctly but when I go to the cart the prices of all the simple products are the price of the first simple product.
For example
Configurable Product 1
       Simple Product 1 - 19.00
       Simple Product 2 - 25.00
       Simple Product 3 - 35.00

If I had checkout with simple product 3 the price in the cart is 19.00

Would really appreciate a bit of guidance on this on

Thanks


texts:
I shifted my site from server to local. But it shows an error like this:

  Notice: Undefined index: PK_CMS_PAGE in
  \vendor\magento\framework\EntityManager\EntityMetadata.php on line 96

can anyone please suggest me how to fix this.

Note: I have already browsed about the issue, and found the solution as the primary key of CMS_PAGE may be missed. But my CMS_PAGE table has a primary key.

Thanks in advance...


texts: Magento 2: Unable to upgrade Magento 2.1.3

texts:
I'm trying to upgrade from Magento 2.1.2 to 2.1.3 on my Linux Server. On my Local WAMP it's working fine.

I'm upgrading in Developer Mode.

I got below error.

root@magento-2:/var/www/html/magento# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Gathering patches for root package.
Loading composer repositories with package information
The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)

  [Composer\Downloader\TransportException]
  The "http://packagist.org/p/symfony/filesystem%24c13f449735d971527daf30626fd921d452706653964a6736a4e50c29258b693d.json" file could not be downloaded (HTTP/1.1 302 Found)

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

[SOLUTION]

Magento 2: Composer Update is Not Working [Failed to open stream: Connection timed out]


texts: How to create customer attribute as dropdown and checkbox in Magento2.2.5?

texts:
I want to create customer attribute for the field as dropdown and checkbox and must save as YES/NO in backend in Magento2?
Refer screenshot.


texts: Notice: Trying to access array offset on value of type null PHP 7.4

texts:
I am having a custom module for magento 2.4.2 but with php 7.4 I am having this issue:

Notice: Trying to access array offset on value of type null in
/public_html/app/code/mymodule/Helper/Data.php on line 242

when trying to save a product in my admin.
My code in this line is:
if (!is_array($section['fields'])) continue;

And the whole //check is:
$sectionOrder = -1;
            foreach($sections as $key => $section) {
                $sectionOrder++;
                if (!is_array($section['fields'])) continue;
                if (isset($section['template_id']) && !in_array((int) $section['template_id'], $templateIds)) {
                    unset($sections[$key]);
                    $sectionOrder--;
                    continue;
                }
                $sections[$key]['order'] = $sectionOrder;
                foreach($section['fields'] as $key2 => $_field) {
                    if (!is_array($_field)) continue;
                    $sections[$key]['fields'][$key2]['section_order'] = $sectionOrder;
                }
            }

With php 7.3 it works but with 7.4 I have problem.
Any help please how I can write this?
Thanks in advance!


texts: Magento2: Many .js requests. How do I merge js files?

texts: I see over 130 requests to retrieve .js files, and I think it is a reason why the magento2 site is so slow. How can I optimize it? I've already set merge and bundle js files in admin, but it's not helping. I've enabled product -s mode, ran di:compile etc. Still the same. Thanks a lot.


texts: Can I move a block from a handle to another?

texts:
<customer_address_index>
        <reference name="my.account.wrapper">
            <action method="unsetChild">
                <name>address_book</name>
            </action>
        </reference>
    </customer_address_index>
    <customer_account_edit>
        <reference name="my.account.wrapper">
            <action method="append">
                <name>address_book</name>
            </action>
        </reference>
    </customer_account_edit>

That is not working, I had to create a new block instance. Is that because the handle is different?


texts: magento minicart add subtotal in icon area where count is shown

texts:
Seems like a pretty simple task but I've edited minicart.phtml with
 and can't seem to figure out why I can't get subtotal next to the shopping cart icon and item count in the upper right hand area.

What is the file that needs to be edited?

vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml

or it is in prepossessed ?


texts: Magento 2 - Plugins on some classes don't work in etc/frontend/di.xml

texts:
I'm trying to do this:

<type name="Magento\Payment\Model\MethodList">
    <plugin name="a_name_plugin" type="Mynamespace\Mymodule\Plugin\Model\Payment\MethodList\Plugin" sortOrder="10"/>
</type>

It isn't activated if I place this declaration in etc/frontend/di.xml.
But it works in etc/di.xml.
I want it to be active only on frontend.

Why it would not work from etc/frontend/di.xml or how to make it work ?

Using Magento 2.0.7
Magento mode is developer.
Cache should not be a problem. var/generation/* was cleaned a few times.

Thank you


texts:
I want to implement Indian GST tax calculation in magento 2.

Any one have idea how can i achieve this ?


texts:
I am trying to follow what "uguptu" is recommending here:

http://www.magentocommerce.com/boards/viewthread/225234/

In particular, I am trying to run my own highly specific query on the sales/order model.  I would like to derive my own collection from the sales/order_collection but need to know where to put that code he recommends.  Do I put it in the model?  If so, how do I modify config.xml for a tableless model?


texts: What is necessity of two separate database table for grid and normal

texts:
In Magento CE 1.7.0.2 in database there are two separate tables for example In case of order, data store in sales_flat_order and sales_flat_order_grid tables but if you see column then sales_flat_order_grid is nothing but subset of sales_flat_order, why magento need two separate table to manage order data as sales_flat_order is enough?

same thing applicable for shipment, invoice, credit memo and etc.


texts: Disable filter in a custom column in sales order grid

texts:
I am using layout handles in adding custom column to my Orders grid. How can i disable the filtering input field?

Here is my code:
app/design/adminhtml/default/default/layout/company

<?xml version="1.0"?>
<layout>
<sales_order_grid_update_handle>
    <reference name="sales_order.grid">
        <action method="addColumnAfter">
            <columnId>printed</columnId>
            <arguments>
                Printed
                <index>printed</index>
                <width>80</width>
                <renderer>Company_myModule_Block_Adminhtml_Sales_Order_Renderer_Printed</renderer>
                <type>text</type>
            </arguments>
            <after>status</after>
        </action>
    </reference>
</sales_order_grid_update_handle>
<adminhtml_sales_order_grid>

    <update handle="sales_order_grid_update_handle" />
</adminhtml_sales_order_grid>
<adminhtml_sales_order_index>

    <update handle="sales_order_grid_update_handle" />
</adminhtml_sales_order_index>
</layout>

Printed.php

<?php
 class Mjsi_Orderprint_Block_Adminhtml_Sales_Order_Renderer_Printed extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
public function render(Varien_Object $row)
    {
    $value =  $row->getData();
    $value = $value['entity_id'];

    $resource = Mage::getSingleton('core/resource');

    /**
     * Retrieve the read connection
     */
    $readConnection = $resource->getConnection('core_read');

    /**
     * Retrieve our table name
     */
    $table = $resource->getTableName('orderprint/orderprint');

    $query = 'SELECT orderprint_id FROM ' . $table . ' WHERE order_id = '
             . $value . ' LIMIT 1';

    /**
     * Execute the query and store the result in $sku
     */
    $value = $readConnection->fetchOne($query);
    //return $value;

    if($value) {return 'Yes';}
    else {return 'No';}
    ///return ''.$value.'';
    }
}


texts: How to call a js file on sales reorder page admin in Magento 1?

texts:
I am trying to call a js file into
sales reorder page.
Is their any way we can call a js file into that page ?


texts: Latest Magento 2.3.3 version Product Attribute Length, Width, Height

texts:
Recently Magento has released it new Version 2.3.3 which has a lot of updates.

One which is more affecting the Product Page is Product Dimensions i.e Length, Width and Height.

Till version 2.3.2 by default we have these 3 attributes on Product Detail page as below

But in new Version there are no such attributes there

I need to know if someone can tell me how to get these back there on Product page.

These fields are from Temando Shipping Module (Magento Default).

Any help regarding this is highly appreciated.


texts: Magento 2 Grouped Product Add Product with Custom Options to Cart

texts:
I have a grouped product composed of simple products with custom options. I am displaying the custom options in a dropdown. The trouble I am having is that on submission of the form ("Add to Cart") the custom options are not being recognized. I have listed part of the form post below to illustrate. Will the add action handle this or do I need to write my own controller action to do this?

Form Post to ~/checkout/cart/add/

product:1182
selected_configurable_option:
related_product:
form_key:f1TDY3pWTMTYZUWC
options[865]:11558
super_group[628]:1
super_group[1281]:0

Any help is appreciated.


texts:
I am trying to create a magento plugin I have create every thing required.

when I enabled the plugin then it shows the below error. What I am missing here.

  Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
  The following modules are outdated:

Test_Featureproduct data: current version - none, required version - 2.0.0
\#0 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
\#1 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
\#2 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'storeCookieVali...')
\#3 /Applications/XAMPP/xamppfiles/htdocs/magento2/app/code/Magento/Store/Model/Plugin/StoreCookie.php(78): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
\#4 [internal function]: Magento\Store\Model\Plugin\StoreCookie->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
\#5 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
\#6 /Applications/XAMPP/xamppfiles/htdocs/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
\#7 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
\#8 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
\#9 /Applications/XAMPP/xamppfiles/htdocs/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
\#10 {main}

Module.xml

InstallData.php