texts: Magento2 Add custom form in order view but url don't correct

texts:
I have a problem when add a custom tabs in order view.
In new tabs, I have html form:

<form action="<?php echo $block->getUrl('giftvoucheradmin/giftvoucher/addcodetoorder') ?>" method="POST">
            // something in here
</form>

However, when I click button it alway redirect to admin dashboard. I have try view console and coppy this url and open another window then action work well
May I help you?
Thank you.


texts: Magento EE PayPal IPN issue: PHP Fatal error: Call to a member function save() on a non-object in app/code/core/Mage/Paypal/Model/Ipn.php on line 532

texts:
We've received an e-mail from PayPal alerting us that our IPN page is returning a lot of 500 errors. We've investigated the various error logs and found the following error within the /var/log/nginx directory. The full directory path has been removed for obvious reasons.

PHP Fatal error:  Call to a member function save() on a non-object in app/code/core/Mage/Paypal/Model/Ipn.php on line 532"

We're running Magento Enterprise 1.13.0.2 and the method which contains line 532 is located within the following function.

/**
 * Process completed payment (either full or partial)
 *
 * @param bool $skipFraudDetection
 */
protected function _registerPaymentCapture($skipFraudDetection = false)
{
    if ($this->getRequestData('transaction_entity') == 'auth') {
        return;
    }
    $parentTransactionId = $this->getRequestData('parent_txn_id');
    $this->_importPaymentInformation();
    $payment = $this->_order->getPayment();
    $payment->setTransactionId($this->getRequestData('txn_id'))
        ->setPreparedMessage($this->_createIpnComment(''))
        ->setParentTransactionId($parentTransactionId)
        ->setShouldCloseParentTransaction('Completed' === $this->getRequestData('auth_status'))
        ->setIsTransactionClosed(0)
        ->registerCaptureNotification(
            $this->getRequestData('mc_gross'),
            $skipFraudDetection && $parentTransactionId
        );
    $this->_order->save();

    // notify customer
    $invoice = $payment->getCreatedInvoice();
    if ($invoice && !$this->_order->getEmailSent()) {
        $this->_order->sendNewOrderEmail()->addStatusHistoryComment(
            Mage::helper('paypal')->__('Notified customer about invoice #%s.', $invoice->getIncrementId())
        )
        ->setIsCustomerNotified(true)
        ->save();
    }
}

Line 532 is the save() method called on the $this->_order->sendNewOrderEmail().... towards the bottom of the function. As testing the IPN is ridiculously hard from a local environment I was wondering if anyone had come across this error before? or if they can point me in the right direction of the issue.


texts: How do you make the Place Order button disabled until after the address update button is pushed?

texts:
I am in Magento 2.13. If a customer checks out and uses a different billing and shipping address, the place order button is live, even if they have not pushed the update address button.
This causes the shipping address to over write the billing address when it is submitted causing errors in the CC processing and also for the shipping address to show up in the invoice.
How can I make it so that the Place Order button is disabled until AFTER they have hit the update button for the address?


texts: Customer login not working for safari and chorme

texts:
I am facing strange issue, I am unable to login in frontend using Chrome and Safari, but other browser it works.

Find the cookies setting in magento admin:

Cookie Lifetime=>3600
Cookie Path=>blank
Cookie Domain=>blank
Use HTTP Only=>No
Cookie Restriction Mode=>No

Now I have seen many post to change the Http only flag. But when changing this, the other browsers stop working and Chrome start working.

Any idea about that?


texts: We're sorry, an error has occurred while generating this email. (getimagesize(): Filename cannot be empty)

texts:
I'm using the theme - http://magento2.flytheme.net/themes/sm_furnicom/french/#

I purchased the theme from themeforest and had been trying to set up the application newly on the VPS. After I run the installer successfully, I get the following error on the home page "We're sorry, an error has occurred while generating this email.".

var/log/exception.log displays the following error

main.CRITICAL: exception 'Exception' with message 'Warning: getimagesize(): Filename cannot be empty in /home/wwwbookmaniaco/public_html/dev/vendor/magento/framework/Image/Adapter/AbstractAdapter.php on line 304'


texts: Shopping cart rule to apply discount every X amount of products

texts:
I want to add a shopping cart rule to my site which gives a discount every 3rd item. For example if there are 3 items for a category in the cart, provide a discount of £2, and when there are 6 items, apply discount of £4 etc. I also have to consider if a customer buys 4 or 5 they'd get the discount set on buying 3 etc. Is it possible to do this with a single rule?

Thanks in advance.


texts: What are the basic commands to be executed for Deploy in Magento 1 and Magento 2 after doing the git pull?


texts: All 'not found' pages routing to homepage

texts:
I have an issue that all pages that result in an error (such as 404) are routed to the site root despite the routing config -> web -> default pages being set to a 404 CMS page. I can't figure out what is happening.

I have checked:

magento rewrite table
.htaccess for any rules

I know this is vague, but any ideas on where to check configuration etc to determine what the routing issue is? There is a similar question that went unresolved according to final comment by poster here: Not found page is not coming up

Running magento 1.9.3.7


texts: Magento 1.9 . php_curl.dll and soap.dll is not loading

texts:
I am getting following errors on error_log file

  [26-Dec-2016 00:56:14 America/Denver] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/php_soap.dll' - /usr/php/56/usr/lib64/php/modules/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0


texts: How to use Debug Backtrace in magento 2?

texts:
In magento 1.x we can use backtrace like

echo Varien_Debug::backtrace(true, true); exit;

How can we use this facility in Magento 2?


texts: Downloading sample data from magento in AWS ec2 instance

texts: Iam new to AWS and Magento as well and iam trying to download Sample Magento data in my EC2 instance . I have installed magento in EC2 . When  I tried using bin/magento sampledata:deploy in my EC2 , i got the error message as bin/magento not found. Can anybody tell what are the steps to download sample data in my ec2?


texts: View all REST API routes of my Magento 2

texts: I am looking for the url which will show all the available API REST routes. I have seen it before, which outputted some json. I just can't recall the url nor can't I find the right information. Anyone have a clue?


texts: Magento 2 - Call Ajax controller on click of place order?

texts:
I've set up the JS, and controller and checkout.html

I need to call the controller with ajax to getPrice() method.
My controller name is GetAjax.php and here is the controller code.

<?php

namespace Iostpay\Iostpaymagento\Controller\Index;

use Magento\Framework\Controller\ResultFactory;

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

    public function execute()
    {
        print($this->getRequest()->getParam('customdata1'));
        print("heuss");
        die();
        /** @var \Magento\Framework\Controller\Result\Json $result */
        $result = $this->resultJsonFactory->create();

        return $result->setData(['success' => true]);
    }
}

And the JS code which triggers on click of  place order.

require(["jquery"], function ($) {
    function transfer() {
        var customurl = "modulename/index/GetAjax'";
        $.ajax({
            url: customurl,
            type: 'POST',
            dataType: 'json',
            data: {
                customdata1: 'test1',
                customdata2: 'test2',
            },
            complete: function(response) {
                console.log( response );
            },
            error: function (xhr, status, errorThrown) {
                console.log('Error happens. Try again.');
            }
        });
   }
});

The Error I get in console is

POST http://127.0.0.1/magento3/newmodule/GetAjax/execute 404 (Not Found)

How can I execute any specific method from the controller.

Does anyone know how to do it?

Thanks in advance.


texts:
How to enable admin account.

I get account disabled.

I tried to :

php bin/magento admin:user:unlock admin (admin - username)
UPDATE `admin_user` SET `password` = MD5('mypassword') WHERE `username` = 'admin';
Cleared cache and ran setup upgrade.

But still, I'm unable to log in.


texts: Magento2 : sales order grid add new column with it's values

texts:
when order placed at that time in admin sales order check that there is a gift option available or not if it is available that dispaly "yes" in order grid column else display "no".

please see attachments for more.

please share any suggestion if you have.

1) image where gift option available

2) image where display "yes" in grid

thanks


texts: Magento 2 : Undefined variable: returnValue

texts:
<?php

namespace StripeIntegration\Payments\Plugin\Sales\Model\Service;

class OrderService
{
    public function __construct(
        \StripeIntegration\Payments\Helper\Rollback $rollback,
        \StripeIntegration\Payments\Helper\GenericFactory $helperFactory
    ) {
        $this->rollback = $rollback;
        $this->helperFactory = $helperFactory;
    }

    public function aroundPlace($subject, \Closure $proceed, $order)
    {
        try
        {
            $this->rollback->reset();
            $returnValue = $proceed($order);
            $this->rollback->reset();
        }
        catch (\Exception $e)
        {
            $helper = $this->helperFactory->create();
            \StripeIntegration\Payments\Helper\Logger::log($e->getMessage());
            if ($order->getId())
            {
                // The order has already been saved, so we don't want to run the rollback. The exception likely occurred in an order_save_after observer.
                $this->rollback->reset();
                $helper->dieWithError($e->getMessage(), $e);
            }
            else
            {
                $msg = $e->getMessage();
                if (!$this->isAuthenticationRequiredMessage($msg))
                    $this->rollback->run($e);
                else
                    $this->rollback->reset(); // In case some customization is trying to place multiple split-orders

                $helper->dieWithError($e->getMessage(), $e);
            }
        }
        return $returnValue;
    }

}


texts: Magento 2.3.5 - Flat Catalog module has a limit of 64$d filterable and/or sortable attributes

texts:
I'm getting the error below during my setup:upgrade:

The Flat Catalog module has a limit of 64$d filterable and/or sortable
attributes. Currently, there are 67$d of them. Please reduce the number
of filterable/sortable attributes in order to use this module

Also, I had referred the LINK: Magento 2.1 - Flat Catalog module has a limit of 64$d filterable and/or sortable attributes, It doesn't help me I need to use the flat indexing to speed up my site
How can I fix it? Is that a limit Error?
Any help is appreciated.


texts:
I am working on magento 2.1 extension in which i have to show popup on all pages.
I have write a code for popup which is showing on only one page but i want to apply that code on all pages.


texts: magento2: drop-down attribute call an image if its Yes

texts:
i would like to call an image if the drop-down attribute is marked as "yes" from drop-down - if its "No" then i dont want to call an image. i am using the below code but this seems to pull the image for yes and no.

<?php //echo $_product->getAttributeText('discount');
if($_product->getAttributeText('discount')){ ?>
<img src='<?php echo $this->getViewFileUrl('images/footer-logo.png'); ?>' alt="Demo">

<?php } ?>

Thank you


texts: Decrease the shipping cost as quantity increases

texts:
I need adjust the shipping cost in Magento 2 with changing quantity.
Suppose ecommerece site is selling Laptops
Cost of shipping of 1 Laptop is $50
Now as quantity increases, I should be able to lower the shipping cost
for example
Cost of shipping for 2 laptops should be $80
Cost of shipping for 3 laptops should be $100
Cost of shipping for 4 laptops should be $110

and so on...
I am thinking about using https://amasty.com/shipping-rules-for-magento-2.html this extension.
IF anybody knows it how to achieve this, I would be very thankful


texts: Product view error in admin panel Magento 2

texts:
Not able to view the product in the admin panel.
getting below error in console.

Unable to process binding "if: function(){return label }"
Message: label is not defined

I am not finding any fix for this.


texts:
I have just tried to apply PATCH_SUPEE-5994 however below is the message I got. Has anyone else experienced this issue?

bash PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
patching file app/code/core/Mage/Customer/Model/Customer.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
patching file app/code/core/Mage/Install/Controller/Router/Install.php
patching file app/code/core/Mage/Install/etc/config.xml
Hunk #1 FAILED at 48.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Install/etc/config.xml.rej
patching file app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php
patching file downloader/Maged/Model/Connect.php
patching file downloader/Maged/View.php
patching file downloader/template/connect/packages_prepare.phtml
Hunk #1 FAILED at 33.
1 out of 1 hunk FAILED -- saving rejects to file downloader/template/connect/packages_prepare.phtml.rej
patching file downloader/template/messages.phtml
Hunk #1 FAILED at 30.
1 out of 1 hunk FAILED -- saving rejects to file downloader/template/messages.phtml.rej
patching file get.php
patching file lib/PEAR/PEAR/PEAR.php
patching file lib/PEAR/PEAR/PEAR5.php
patching file lib/Varien/Io/File.php


texts: How to schedule currency_rates_update cronjob weekly on specified day of week?

texts:
I'm trying to schedule currency_rates_update (webservicex) cronjob weekly but the Magento interface not give me the possibility to select the day so I should change it by database (otherwise the system set to 1, monday).

Any solution or patch to solve this issue?


texts:
so if i sell a product in the uk or eu i must charge vat but my site has all price listed including vat for example

product is on the site for £10, to a uk and eu customer it means they pay £8+£2vat=£10

But currently after doing my tax rules it seems when a customer buys from the US or another non EU country

The products on the site for £10, magento seems to remove the vat and on their checkout page & charge them £8

I want the product to be for sale for £10

if the customer is from a eu country to remove the vat from the product and the total charge exuding shipping to be £10 including vat,

however if the customer is from a non EU country i want them to be charged £10 also and not vat should be implied on their invoice

If that makes sense?


texts: Magento 1.9.3.8 Actual purpose of Cookie Restriction mode?

texts:
Hi guys I have enabled the cookie restriction mode in my magento installation, but cannot gather the purpose of this mode. it displays a banner for users to accept, but actually doesn't look to be restricting anything. So, is this just a loose cookie notice toggle setting and not actually considered in the functionality?

This is because for one I can see the cookies frontend_cid and frontend  both being set before the user even accepted the cookies storage. Defeating the purpose of it.

Hopefully, someone can clear this up for me.

Also, does not work in local install. I.e, in a xampp installation the accept button just redirects to:

http://127.0.0.1/mag19/cms/index/noCookies/


texts: How to update the remove item in checkout/cart section?

texts:
I am new user of Magento and  added remove_item link near quantity block at grouped product section at each product in grouped product.

The item get removed at grouped product page but when i proceed to cart page by clicking add-to-cart page then it not updated the cart.

It again showing the removed item on cart page. But I don't want removed item on cart page.

Please anyone suggest me how should i overcome this problem.(I want same functionality like minicart remove_item link proceed).

Please suggest me suitable solution for it.


texts: Where is the event sales_order_save_before dispatched?

texts:
I am tring to figure out when sales_order_save_before is dispatched but I do not see it in the source.

What class is responsible for dispatching this event?


texts: Magento 1.9 Extend Model, Load It Before Parent

texts:
Class Test1/Module1/Model/A {

    protectedfunction doSomething(){
        //behaviour
        //behaviour
        //behaviour
    }
}

Class Test2/Module2/Model/B extends Test1/Module1/Model/A {

    protected function doSomething(){
        //behaviour
        //behaviour
        //added behaviour
        //behaviour
    }
}

Now in Test2/Module2/Model/B/etc/config.xml -

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

Now when Test1/Module1/Model/A is called I want Test2/Module2/Model/B to extend its behaviour. Is this the correct way?


texts: Built in option of emailing client after submitting contact form

texts:
Is there a built in option in magento of emailing the client after submitting the contact form?

I can't find anything like it..


texts:
UPDATE
Below is the original question, and while it's related to what the issue ends up being, it's tangential. Please see the edits starting with number 2 for more useful background information

On our site, we have some CMS pages that explain correlation between two different categories. As such, the URLs tend to be similar to those catalog page URLs.

An example CMS URL:

"brand/category.html"

The category which matches:

"category"

Is there a setting in Magento to force category route matching to be more strict?

EDIT: I should note, though it feels obvious: These are just example names

EDIT 2: If it's helpful, all catalog pages have URLs relative to root (website.com/subcat) where subcat is a child of another category. This behavior is different from the default in other Magento installs. (Note: this isn't preferred, and it's unclear as to why it's happening).

EDIT 3: After more digging, I found a quote from an article by Fabrizio Branca on URL keys in 1.13:

  Before 1.13/1.8 any CMS page with a url-key that was also used as a category or product url-key would be evaluated first. This way you could easily replace the main categories by cms landing pages. This has changed now. Even though the CMS controller is processed first, the product and category urls will be evaluated before the routing process starts, making it much harder to display cms content in a clean way instead.

EDIT 4: Result of more research:

"legitimate category" exists, and by default is accessible at /a
"legitimate other category" exists as well, and is at b
regardless of the relationship between these two categories, either can be accessed using the other as its parent (a/b works fine, as does b/a).

note that a/b shows products of b and b/a products of a

However, b/b does not work, nor does non-existant-category/a

What I'm looking for is a URL structure similar to the previous Magento versions (IE category/subcategory), without losing the benefits of background indexing that 1.13 gives.


texts: Call a function in different directories

texts:
I want to change the numbers format in magento1.9 with call the function like and call it in different directories like app\design\frontend\ves_arcana\default\template\catalog\product\price.phtml anywhere that the numbers is in use.

Where should I define it?

function farsidigit($text) {
    $text = str_replace('0' , '٠' , $text);
    $text = str_replace('1' , '١' , $text);
    $text = str_replace('2' , '٢' , $text);
    $text = str_replace('3' , '٣' , $text);
    $text = str_replace('4' , '۴' , $text);
    $text = str_replace('5' , '۵' , $text);
    $text = str_replace('6' , '۶' , $text);
    $text = str_replace('7' , '٧' , $text);
    $text = str_replace('8' , '٨' , $text);
    $text = str_replace('9' , '٩' , $text);
    return $text;
}


texts: Failed to initialize storage module in magento

texts:
When I upgraded Magento 1.7 to Magento 1.8 500 internal errors started to come on the page. I have removed this by changing the permission of index files (644).

But still I am facing an issue. 500 Internal error is gone but this error comes:

  session_start() [function.session-start]: Failed to initialize storage module: user (path: /tmp)

I am storing the session in database. When I do some R&D, someone suggested to change the session.save_handler = user to session.save_handler = files but when I check PHP configuration, I found the same value.

Please suggest me a way how I can remove this error.


texts:
Using AMASTY Special Promotions add on we are wanting to run a promotion for $50 OFF orders of $150, but it excludes specially priced items. Currently it is working to take off $50 of orders of $150 or more, but even though I selected for it to not include certain product, it still is. Any suggestions?

I currently have it as a "Fixed Amount Discount for Whole Cart"


texts: Magento : add custom php code into product description

texts:
I wrote a php script that resizes jpeg images provided by external URL. The script works well on my server with a test page, but it seems that Magento doesn't allow custom php code into product description.

Is there any way to insert that piece of code into description ?

<?php
header('Content-Type: text/html; charset=utf-8');

$url_A = 'http:/...';
$url_B = 'http:/...';

$resizer_URL = 'http:/...';

echo '
      ';

?>

The script code is:

<?php
// The file
$filename = $_GET['url'];

// Content type
header('Content-type: image/jpeg');

// Get new dimensions
list($width, $height) = getimagesize($filename);

$ratio = $height / $width;

$new_width = 580;
$new_height = $new_width * $ratio;

// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

// Output
imagejpeg($image_p, null, 75);

//
imagedestroy($image_p);
imagedestroy($image);
?>

Thanks.


texts: Magento 2.3.2 call console command in observer

texts:
I have a module that programmatically creates new products in Magento 2.3.2 with multiple store views. This Magento version has an issue that causes the product URL to be correct only for the default store view. In order to solve this, I installed the OlegKoval RegenerateUrlRewrites extension that adds a console command to add the missing URLs in the database. The extension works: I run the extension console command and the URLs are fixed.

So what I'm doing right now is:

the method is called and generates all the new products
I manually run OlegKoval command to fix the URLs

What I'd like to achieve:

the method is called and generates all the new products
the same method then calls the OlegKoval command to fix the URLs so that I don't have to run the command manually

Is there a way to achieve this?


texts:
I'm trying to display a custom attribute in the Productslisting.
It's working great, but when searching for products, this attribute seems to be not available here.

<?php
    echo $this->__('Delivery period: %s workdays', $_product->getDeliverydays());
?>

Why is this attribute not avaliable in search results? And what's the best way to fix this?

Thanks.


texts: Upgrade an extension/module that was installed via Magento Connect

texts: We're looking for a way to upgrade an extension via Magento Connect, without having to uninstall and then install for upgrades.


texts: Magento 1.9.2 addAttributeToFilter function not working default theme

texts:
I have added product filter addAttributeToFilter in Catalog/Block/Product/List.php file as show below

class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstract {

    ...

    protected function _getProductCollection() {
        ...
        $this->_productCollection->addAttributeToFilter('type_id', array('eq' => 'simple'));
        ...
        return $this->_productCollection;
    }

    ...

}

The above code is not working in default magento theme but same is working on RWD Magento theme.

Now query :

How it will solve?
Is Magento developed code base on theme?

Update :

 $this->_productCollection->getSelect()->joinInner(array('cpe' => 'catalog_product_entity'),'e.entity_id = cpe.entity_id')
              ->where("cpe.type_id = 'simple'");

This is working in all theme.


texts: Magento 2 - PHPUnit using mocking or without mocking?

texts:
I am developing an eCommerce web application using magento2. During the development I came to know magento2 useses mockbuilder or mock objects for testing it's modules functionality.

Which is fare in below cases:

Actual method call will consume more memory then a stub(mock).
Functionality which is not developed yet can be stub ( mock) and
dependent functionality can be test by setting expected output in
stub(mock).
In CICD ( continues integration and continues testing )environment If
we have all test written without mocking, It will a big overhead on
server in terms of memory consumption.

So here is the actual question, Weather we should use mocking while writing PHPUnit test cases all the time or we should use mocking in some cases only?

Need an expert advice on this.

Thanks


texts:
I have two store : one is Default English and one is France.here is my csv file for France.I don't know this is right way or not . But know any changes happening after store switching

"Add to Wish List", "Liste de souhaits"
"Add to Compare","Comparer"
"Your Checkout Progress","Commander"
"Card Verification Number","CVV"
"Items %1-%2 of %3", "% 3 articles"
"Regular Price","était"
"Shop By","Filtre"
"Remove item","Retirer"
"Proceed to Checkout",  "Aller à la caisse"
"Grand Total", "Total estimé"
"Review by", "par"
"View Order", "Vue"
"Update Shopping Cart","Mise à jour panier"
"Print Order", "Impression"
"Move to Wish List","Déplacer"
"Copie dans la liste de souhaits","Copie"
"Move Selected to Wish List", "Déplacer sélectionné"
"Copy Selected to Wish List","Copier sélectionné"
"%1 items in wish list", "%1 items"
"1 item in wish list", "1 item"
"Continue to Shipping Information", "Select Shipping Method".

One question more I do not have any Idea how to change Email , login , create account and other default message in France.

Here is my default English CSV file

"Add to Wish List", "Wish List"
"Add to Compare", "Compare"
"Your Checkout Progress", "Checkout Progress"
"Card Verification Number", "CVV"
"Items %1-%2 of %3","%3 items"
"Regular Price", "was"
"Shop By","Filter"
"Remove item", "Remove"
"Proceed to Checkout", "Go to Checkout"
"Grand Total", "Estimated Total"
"Review by", "By"
"View Order", "View"
"Update Shopping Cart", "Update Cart"
"Print Order", "Print"
"Move to Wish List","Move"
"Copy to Wish List","Copy"
"Move Selected to Wish List", "Move Selected"
"Copy Selected to Wish List", "Copy Selected"
"%1 items in wish list", "%1 items"
"1 item in wish list", "1 item"
"Continue to Shipping Information", "Select Shipping Method"


texts: Magento 2 add a different container per store

texts:
At the moment I have the following code in a layout xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <title>Contact Us</title>
</head>
<body>
    <referenceContainer name="page.wrapper">
      <container name="map" as="map" before="page.top" label="Map" htmlTag="div" htmlClass="map">
            <block class="Magento\Framework\View\Element\Template" name="map" template="Magento_Contact::map.phtml" />
      </container>
</referenceContainer>
</body>

My question is how do I change the block based on the store view


texts: Magento 2 How to add custom label and their Value in Order Summary?

texts:
I am making Layaways(Buying Products in installments) feature for a website. I have to add custom Lables and the values against them.
I need these Lables and values:

In Order Summary at the page checkout/#payment:

And on order details page as MY Account->My Orders->View Order

Has anyone done anything similar they wish to share to get me started?


texts:
Earlier I was facing PayPal IPN postback failure issue in my Magento store version 1.5.1.0 I am using Paypal Website Payment standard method.

I have fixed this issue using link http://www.dhmedia.com.au/article/debugging-paypal-ipn-postback-failures-magento

Now from few days back I started getting same issue again for some paypal orders and it is quite random, for some users it is coming and for others it is working fine.
Also we are using SSL on our store.

What can be the probable issues and how can I track this?


texts: Unable to view website in different store view after migration

texts:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sale' in 'where clause', query was: SELECT DISTINCT  COUNT(DISTINCT e.entity_id) FROM catalog_product_entity AS e
INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=3
INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' WHERE (((IFNULL(sale, 0) = '1') )) {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sale' in 'where clause', query was: SELECT DISTINCT  COUNT(DISTINCT e.entity_id) FROM catalog_product_entity AS e
INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=3
INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' WHERE (((IFNULL(sale, 0) = '1') )) at /chroot/home/a2267c20/dev.rugsville.in/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sale' in 'where clause' at /chroot/home/a2267c20/dev.rugsville.in/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []


texts: How to migrate customer data from magento 1.9 to 2?


texts: OnePageCheckout JS breaking for Internet Explorer 11 only after upgrade

texts:
Recently upgraded from Magento CE 1.5 to Magento 1.9.0.1. I kept the original 1.5 custom theme which was done by someone else. Starting receiving emails a few days later from customers on IE11 who were complaining of the checkout "freezing up" or not allowing them to continue. Here is a screenshot of what the customer sees.

I fired up IE11 and opened the inspector which revealed the following errors;

After comparing the console errors to Chrome and Firefox, I determined that the errors present in IE11 but not in others. The error is:

  Unable to get property 'reject' of undefined or null reference.

After some Googling, this seems to be a very ambiguous error. Has anyone experienced a similar problem after upgrading? Thank you.


texts: Show "out of stock" products only for given time

texts: Is there a possibility to show "out of stock" product for given  period of time (fe. 3 month) and then not showing it anymore ?


texts:
I try to override Mage_Sitemap_Model_Resource_Catalog_Product class. Here is my files:

File \magento\app\etc\modules\Own_Sitemap.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <config>
        <modules>
            <Own_Sitemap>
                <active>true</active>
                <codepool>local</codepool>
            </Own_Sitemap>
        </modules>
    </config>

File \magento\app\code\local\Own\Sitemap\etc\config.xml

    <?xml version="1.0"?>
    <config>
    <modules>
        <Own_Sitemap>
            <version>0.1</version>
        </Own_Sitemap>
    </modules>
    <global>
        <models>
            <sitemap>
                <catalog_resource>
                    <rewrite>
                        <product>Own_Sitemap_Model_Resource_Catalog_Product</product>
                    </rewrite>
                </catalog_resource>
            </sitemap>
        </models>
    </global>
    </config>

File \magento\app\code\local\Own\Sitemap\Model\Resource\Catalog\Product.php

class Own_Sitemap_Model_Resource_Catalog_Product extends Mage_Sitemap_Model_Resource_Catalog_Product
{
    /**
     * Get product collection array
     *
     * @param int $storeId
     * @return array
     */
    public function getCollection($storeId)
    {
        /* @var $store Mage_Core_Model_Store */
        $store = Mage::app()->getStore($storeId);
        if (!$store) {
            return false;
        }

        $this->_select = $this->_getWriteAdapter()->select()
            ->from(array('main_table' => $this->getMainTable()), array($this->getIdFieldName()))
            ->join(
                array('w' => $this->getTable('catalog/product_website')),
                'main_table.entity_id = w.product_id',
                array()
            )
            ->where('w.website_id=?', $store->getWebsiteId());

        $storeId = (int)$store->getId();

        /** @var $urlRewrite Mage_Catalog_Helper_Product_Url_Rewrite_Interface */
        $urlRewrite = $this->_factory->getProductUrlRewriteHelper();
        $urlRewrite->joinTableToSelect($this->_select, $storeId);

        $this->_addFilter($storeId, 'visibility',
            Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds(), 'in'
        );
        $this->_addFilter($storeId, 'status',
            Mage::getSingleton('catalog/product_status')->getVisibleStatusIds(), 'in'
        );

        $entries = $this->_loadEntities();
        $this->_addFilter($storeId, 'inchoo_meta_robots', array(200, 201), 'in');
        $noindex = $this->_loadEntities();

        foreach ($entries as $k => $v){
            if (array_key_exists($k, $noindex)) {
                unset($entries[$k]);
            }
        }
        return $entries;
    }

}

When I try to generate new sitemap, application stiil use Mage class. I tried to remove the cache, but it did not help. What am I doing wrong?


texts: get attribute to create configurable product

texts:
i want to create configurable product.

when i select attribute set how can i get related attribute to create configurable product?

i use this code to select attribute

jQuery('#attribute_set_id').on('change', function() {
    var a=(jQuery('#attribute_set_id').val());
    <?php
        $html='';
        $att_id="<script>document.write(a)</script>";
        $attributes = Mage::getResourceModel('catalog/product_attribute_collection')->setAttributeSetFilter($att_id)->getItems();
        foreach ($attributes as $attribute)
        {
            if($attribute->getIsGlobal()==1 &&  $attribute->getIsVisible()==1 && $attribute->getIsConfigurable()==1 && $attribute->getFrontendInput()=='select' )
            {
                $id=$attribute->getId();
                $html.= $attribute->getFrontendLabel();
                $html.= "<input class='chk_attr validate-one-required' type=checkbox name=attribute[] value=$id >";
                $html.= '<br>';
            }
        }
    ?>
    jQuery('#check_fieldset_attr').html("<?php echo $html;?>");
});

but it not work properly.


texts: Send personalized email (different template) on customer registration on magento2

texts:
Is there a way to send a different email template on customer's registration based on some params (for example the customer gender)?

For example: A male customer receive an email (defined in Maketing->email templates) with the id 11, and a female customer on registration receive the email with the id 12.

I have to overwrite all the customer module?


texts:
Hi I am converting a quote to order programatically. 929 is a quote id of a guest user.When i am trying a actual customers quote id it is working fine.but for guest this is not working. giving error as

  Fatal error: Call to a member function getIncrementId() on a
  non-object

here is my code

$quoteObj = Mage::getModel('sales/quote')->load(929); // Mage_Sales_Model_Quote
        $items = $quoteObj->getAllItems();
         $quoteObj->reserveOrderId();

        //print_r($items);
$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 = $quoteObj->getBillingAddress()->addData($addressData);
$shippingAddress = $quoteObj->getShippingAddress()->addData($addressData);

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

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

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

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

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

Please Help.

edit : This code is using rest api with put method.

public function checkout($postParams,$data){
        $response = array();
        $registryId = $postParams['registry_id'];
        $quoteId = $data['quote_id'];
        $quoteObj = Mage::getModel('sales/quote')->load($quoteId);
        $quoteObj->reserveOrderId();
        $BillingData = array(
            'firstname' => $data['first_name'],
            'lastname' => $data['last_name'],
            'street' => $data['street_address'],
            'city' => $data['city'],
            'postcode' => $data['zipcode'],
            'telephone' => $data['phone'],
            'country_id' => $data['country'],
            'region_id' => $data['region'],
            'quote_id' => $quoteId,
        );
    // addresses

        $billingAddress = $quoteObj->getBillingAddress()->addData($BillingData);
        $shippingAddress = $quoteObj->getShippingAddress()->addData($BillingData);
        $shippingAddress->setCollectShippingRates(true)->collectShippingRates()
                ->setShippingMethod('flatrate_flatrate')
                ->setPaymentMethod('checkmo');
        $quoteObj->getPayment()->importData(array('method' => 'checkmo'));
        $quoteObj->collectTotals();
        $service = Mage::getModel('sales/service_quote', $quoteObj);
        $service->submitAll();
        $order = $service->getOrder();
        $IncrementId=$order->getIncrementId();
        $response['success'] = True;
        $response['message'] = "Order Placed Succesfully";
        $response['id']=$IncrementId;
        return $response;
    }

This is returning me the error for getting increent id and no order is placed.This is also adding a quote to quote item table with empty values.


texts:
I'm trying to run beforeEvent  for a model Magento\InventorySourceDeductionApi\Model\SourceDeductionService but it's not working My code is as follow:
di.xml
 <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="Magento\InventorySourceDeductionApi\Model\SourceDeductionService">
            <plugin name="beforeShipment" type="Arunendra\Shipment\Plugin\SourceDeductionServicePlugin" sortOrder="1" />
        </type>
    </config>

Plugin file:
<?php

namespace Arunendra\Shipment\Plugin;

class SourceDeductionServicePlugin{

    public function beforeExecute(
            \Magento\InventorySourceDeductionApi\Model\SourceDeductionService $subject
        ) {

            $sourceCode = $subject->getSourceCode();
            $outOfStockItems = [];
            foreach ($subject->getItems() as $item) {
                $itemSku = $item->getSku();
                $qty = $item->getQty();

                $sourceItem = $this->getSourceItemBySourceCodeAndSku->execute($sourceCode, $itemSku);
                if (($sourceItem->getQuantity() - $qty) < 1) {
                    array_push($outOfStockItems,$itemSku);
                 }
            }
            if(count($outOfStockItems)){
                $message = implode(', ',$outOfStockItems);
                throw new LocalizedException(
                    __('Unable to Submit Shipment, Some items are out of stock: ' .$message)
                );
            }
        }
}

it's thowing error:
Fatal error: Uncaught Error: Call to undefined method Magento\InventorySourceDeductionApi\Model\SourceDeductionService\Interceptor::getSourceCode() in


texts: Flag a product to be updated in next scheduled run. Change index status manually

texts: We have some scripts which updates few product attributes directly, I want to set the product to be picked up in the next schedular cron and push it in to solr. Currently the only possible way seems to be to issue a save() on product which is costly. Is there any other way of changing the index status of a product?


texts: I cannot load a category on the homepage

texts:
Synopsis

I would like to create a category for Best Sellers, for this I create a root category which will contain certain products.

On my homepage, I have a block that will simply display these associated products.

The Problem

When I try to load my category model the normal way, I get an empty category model.

$category = Mage::getModel('catalog/category')->load(100);

So I tried the collection knowing this should work seeing as there wouldn't be any default filters:

$category = Mage::getResourceModel('catalog/category_collection')
    ->setIdFilter(100)
    ->getFirstItem();

Which works, with the exception it isn't what i'm looking for.

I found an article on StackOverflow describing one problem is that the category flat tables may not be indexed, so I ran the indexer as per:

$ php shell/indexer reindexall

Still, not having any luck with it.  I checked the Admin configurations to double check flat tables were being used:

  System > Configuration > Catalog > Frontend -> Use Flat Catalog Category

Where by Use Flat Catalog Category and Use Flat Catalog Product are both set to yes.

Inside my CMS Page I have implemented some layout XML following:

<block type="vendor/bestseller" name="home.best_seller" template="catalog/bestseller.phtml">
    <action method="setCategory"><category_id>193</category_id></action>
</block>

<?php

class Vendor_BestSeller_Block_Bestseller extends Mage_Core_Block_Template
{
    protected $category;

    public function setCategory($category)
    {
        if ( ! ($category instanceof Mage_Catalog_Model_Category)) {
            //$category = Mage::getResourceModel('catalog/category_collection')
            //    ->addIdFilter($category)
            //    ->getFirstItem();

            echo '<pre>';
            Zend_Debug::dump( $category );

            $category = Mage::getModel('catalog/category')->load($category);

            Zend_Debug::dump((string) $category->getCollection()->setSelect());
            die;
        }

        if ( ! $category->getId()) {
            Mage::throwException('Unable to load category.');
        }

        return $this->category = $category;
    }

    public function getCategory()
    {
        return $this->category;
    }
}


texts:
I am adding static block in footer and getting this error.

Invalid block type. where is my mistake.

<referenceContainer name="footer-container">
    <block type="Magento\Cms\Block\Block" name="footerslinks">
       <arguments>
         <argument name="block_id" xsi:type="string">footers_links</argument>
       </arguments>
    </block>
 </referenceContainer>


texts: Magento 2 - Configurable product with changing page

texts:
I saw some shops, where customers can choose options with changing product page. See example here.

Also, this product was added as simple and we can see them on the category page with the same options.

.

Do I need to make some extensions for this? Maybe someone has any solutions? How to show added a configurable product in the category and can they be related?


texts:
Is there a way to override a .phtml file on language level?

I have 4 stores (language dependency) and i want to make some changes in the code for these different countries.

I this possible through, let say for instance:

  vendor/store/i18n/de_DE/Magento_Catalog/templates/product/list.phtml

(this does not work)


texts: when run the url getting 404 error in custom module

texts:
When run the custom module getting 404 error. Anyone, please help me.

  app/code/Tychons/Registration/Block/Index.php

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

namespace Tychons\Registration\Block;
use Magento\Framework\View\Element\Template\Context;
use Magento\Framework\ObjectManagerInterface;

class Index extends \Magento\Framework\View\Element\Template
{
    protected $customerSession;
    protected $storeManager;
    protected $_object;
    /**
 * @var \Magento\Framework\ObjectManagerInterface
 */

    public function __construct(Context $context,ObjectManagerInterface $interface,array $data = []){
        $this->_object = $interface;
        //$this->storeManager = $storeManager;
        $this->storeManager = $context->getStoreManager();
        parent::__construct($context, $data);
    }

    public function getBaseUrl()
    {
        return $this->storeManager->getStore()->getBaseUrl();
    }

}

  app/code/Tychons/Registration/Controller/Verification.php

<?php
namespace Tychons\Registration\Controller;
use Magento\Framework\Controller\ResultFactory;
class Verification extends \Magento\Framework\App\Action\Action {
    public function execute() {
            $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
            $resultPage->getConfig()->getTitle()->set(__('Email Verification'));
            return $resultPage;
    }

}

  app/code/Tychons/Registration/etc/frontend/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="verification" frontName="verification">
            <module name="Tychons_Registration" />
        </route>
    </router>
</config>

  app/code/Tychons/Registration/view/frontend/layout/registration_verification.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

    <body>
        <referenceBlock name="page.main.title" as="top"  remove="true">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">Verification</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="content">
             <block class="Tychons\Registration\Block\Index" name="verification" template="Tychons_Registration::verification.phtml" after='page.main.title' cacheable="false">
             </block>
        </referenceContainer>
    </body>
</page>

  app/code/Tychons/Registration/view/frontend/templates/verification.phtml

<?php echo "verificatiob page"; ?>

  app/code/Tychons/Registration/registration.php

<?php
/**
 * Module configuration
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Tychons_Registation',
    __DIR__
);

  app/code/Tychons/Registration/etc/module.xml

 <?xml version="1.0"?>
    <!--
    /**
     * Module configuration.
     */
    -->
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="Tychons_Registration" setup_version="1.0.0" />
    </config>


texts: Display products on homepage according to the position given in category products of manage category tab of magento admin

texts:
I want to display products on homepage according to the value of the position.
Suppose i have product category Wood having 4 products then product having position value 1 will be shown first then position value 2 will be shown and the product having position value 4 will be shown in last.


texts: how to disable sales order email (to admin email only) when customers placed an order?

texts:
i want to disable the sales order email which will be sent to admin email account automatically after customers placed an order but keep sending the email to customers's account.

I have checked system->configuration->sales email seems no such setting. Any knows?

edit

public function sendNewOrderEmail()
{
    $storeId = $this->getStore()->getId();

    if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
        return $this;
    }

    $emailSentAttributeValue = $this->load($this->getId())->getData('email_sent');
    $this->setEmailSent((bool)$emailSentAttributeValue);
    if ($this->getEmailSent()) {
        return $this;
    }

    // Get the destination email addresses to send copies to
    $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
    $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);

    // Start store emulation process
    $appEmulation = Mage::getSingleton('core/app_emulation');
    $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);

    try {
        // Retrieve specified view block from appropriate design package (depends on emulated store)
        $paymentBlock = Mage::helper('payment')->getInfoBlock($this->getPayment())
            ->setIsSecureMode(true);
        $paymentBlock->getMethod()->setStore($storeId);
        $paymentBlockHtml = $paymentBlock->toHtml();
    } catch (Exception $exception) {
        // Stop store emulation process
        $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
        throw $exception;
    }

    // Stop store emulation process
    $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);

    // Retrieve corresponding email template id and customer name
    if ($this->getCustomerIsGuest()) {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
        $customerName = $this->getBillingAddress()->getName();
    } else {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
        $customerName = $this->getCustomerName();
    }

    $mailer = Mage::getModel('core/email_template_mailer');
    $emailInfo = Mage::getModel('core/email_info');
    $emailInfo->addTo($this->getCustomerEmail(), $customerName);
    if ($copyTo && $copyMethod == 'bcc') {
        // Add bcc to customer email
        foreach ($copyTo as $email) {
            $emailInfo->addBcc($email);
        }
    }
    $mailer->addEmailInfo($emailInfo);

    // Email copies are sent as separated emails if their copy method is 'copy'
    if ($copyTo && $copyMethod == 'copy') {
        foreach ($copyTo as $email) {
            $emailInfo = Mage::getModel('core/email_info');
            $emailInfo->addTo($email);
            $mailer->addEmailInfo($emailInfo);
        }
    }

    // Set all required params and send emails
    $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $storeId));
    $mailer->setStoreId($storeId);
    $mailer->setTemplateId($templateId);
    $mailer->setTemplateParams(array(
            'order'        => $this,
            'billing'      => $this->getBillingAddress(),
            'payment_html' => $paymentBlockHtml
        )
    );
    $mailer->send();

    $this->setEmailSent(true);
    $this->_getResource()->saveAttribute($this, 'email_sent');

    return $this;
}

it seems that, only way i can do this to edit this function
end of edit


texts: Magento2 Error: Call to a member function handle() on null in /var/www/html/carpet-call/vendor/magento/framework/App/Http.php:156

texts:
Magento2 Error

Error: Call to a member function handle() on null in
/var/www/html/carpet-call/vendor/magento/framework/App/Http.php:156

I am getting above error when using below code
public function getFinalQtyColumnData(){

        $myArray = array(array('gozhi' => 2, 'uzorong' => 1),array('gozhi' => 3, 'uzorong' => 4));

        $valueData = array();

        foreach ($myArray as $key => $sub) {
            foreach ($sub as $id => $value1) {
                $valueData[$id] += $value1;
            }
        }
    }


texts: How to Improve Native Magento Search Functionality

texts:
I'm trying to establish what the best practices are for promoting relevant search results on a new installation of magento. On a code level, are there any recommendations for:

core-overrides or
event-observers

Which you'd recommend implementing to promote more relevance in search results? I've gone the route of setting search type to Like & Fulltext as well as minimizing the number of searchable attributes.

Unfortunately I'm still not very happy with the search results and definitely think that there is room for improvement.

Would appreciate any pointers.


texts: Multiple referenceBlocks in default.xml - but only the last one applies

texts:
I have added multiple referenceBlocks in the default.xml file for the Magento theme. Which I thought would work but it appears it will only ever show which ever is last in the XML file. (i.e. if I swap custom.home to be before customer.header then the header element would show, and vise versa).

Note the order only makes a difference in default.xml not home.xml (the layout file). Can I have multiple reference blocks or am I missing something?

default.xml

    <!-- Removed blocks -->
    <referenceBlock name="catalog.compare.sidebar" remove="true" />
    <referenceBlock name="top.search" remove="true" />
    <referenceBlock name="top.links" remove="true" />
    <referenceBlock name="header.container" remove="true" />
    <referenceBlock name="navigation.sections" remove="true" />
    <referenceBlock name="footer" remove="true" />

    <!-- Add custom blocks -->
    <referenceBlock name="custom.header">
        <container name="globalheader" htmlTag="div" htmlClass="globalheader">
            <block class="Magento\Framework\View\Element\Template" name="row" template="Magento_Theme::html/globalheader.phtml">
                </block>
        </container>
    </referenceBlock>

    <referenceBlock name="custom.home">
        <container name="homehtml" htmlTag="div" htmlClass="htmlHome">
            <block class="Magento\Framework\View\Element\Template" name="row" template="Magento_Theme::html/home.phtml">
            </block>
        </container>
    </referenceBlock>

Home.xml

    <referenceContainer name="main.content" remove="true" />
    <referenceContainer name="content" remove="true" />

    <referenceContainer name="page.wrapper">
        <container name="custom.header" as="custom_header_container" label="Page Header Container" before="main.content"/>
        <container name="custom.home" as="custom_home_container" label="Route for Static HTML Page"  />
    </referenceContainer>
</layout>


texts: RMA:Create Shipping Label: Error " No authorised items or allowed shipping method"

texts:
When trying to create shipping label while processing RMA giving an error "" No authorised items or allowed shipping method"

Steps to reproduce the error:
  1.Place an order (with any other non free shipping method)
  2.Process it to the complete state
  3.Create RMA for the order and authorize item(s).
  4.Click Create Shipping label at the admin RMA screen.

.


texts: Total are not appearing in the "Order Totals" section On ReOrder from admin. Magento 1

texts:
The USD values likeky to be appear within reorders above the international value the way they do in regular orders. Seeing only the foreign currency value makes it difficult to validate that the pricing matches the original order since exchange rates vary over time.

Is their any way i can display USD values within reorders above the international value ?


texts: how to have core login and overridden login at a same time?

texts:
I overridden login controller and placed it in my local directory. I have seperate login.phtml as well. It is working fine. But I would like to have core/Mage/ login as well.

Below is my Mage\Customer\Controllers\AccountController.php

<?php

class Mage_Customer_AccountController extends Mage_Core_Controller_Front_Action
{

    /**
     * Customer login form page
     */
    public function loginAction()
    {
        echo 'Mage'; die;
        if ($this->_getSession()->isLoggedIn()) {
            $this->_redirect('*/*/');
            return;
        }
        $this->getResponse()->setHeader('Login-Required', 'true');
        $this->loadLayout();
        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');
        $this->renderLayout();
    }

Below is my local directory account controller

<?php
require_once 'Mage/Customer/controllers/AccountController.php';
class Ucs_Customer_AccountController extends Mage_Customer_AccountController
{

.
.
.

    /**
     * Customer login form page
     */
    public function popuploginAction()
    {
        if ($this->_getSession()->isLoggedIn()) {
            $this->_redirect('*/*/');
            return;
        }
        $this->getResponse()->setHeader('Login-Required', 'true');
        $this->loadLayout();
        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');
        $this->renderLayout();
    }

When I access my overridden loginAction it automatically redirects to core login method.

I am trying to access overridden popuplogin as below

http://localhost/magento/index.php/customer/account/popuplogin/

and core login as below

http://localhost/magento/index.php/customer/account/login/


texts: Weird URLs: Every link and redirect add "/skin" after mydomain.com creating 404s

texts:
Very basic Magento developer here and have tried googling/searching for this with poor results.  Just took over the site so unsure of the history...

Any Link (i.e. navigation item, product) or Redirect (i.e. after logging into /admin) turns into a 404 Not Found because, for some reason, after the domain.com, "/skin" is being appended to each url like so

mystore.com
mystore.com/skin/product-page.html
mystore.com/admin --> after login --> mystore.com/skin/...

If I remove /skin from the URL, the pages load fine so the site is working, just the URL structure is off somehow.

Anyone ever run into something like this?  Thanks for reading!


texts: How to update all simple products prices from configurable products?

texts:
So we need to update all simple products prices and special prices by making them equal to their related configurable products, but we can't find any extension or process to do that all in one.
We could do this one by one by hand but there are like 3000 products!
Actually we change the prices in the configurable products but prices in the simple ones was the same when they was first added.


texts: Dynamically change product title with custom text option - Magento 2

texts:
My goal is to change my products title dynamically with a custom option (first name).

For an example:

Is there an extension for this? If not, how should I go about creating a module for this?

I am fairly new to developing in Magento so bear with me on my lack of knowledge!


texts:
How can I get a collection with the attribute sets that contain a certain attribute?
I want to be able do to this from a single collection walk (on single select), to avoid loading each attribute set and checking the attributes inside.
I know this seams like standard stuff, but I'm a bit slow these days.


texts: I just started using Magento Go. I've already discovered where to go and add css and uploaded the jslider plugin, the jquery that allows making an image slideshow. However, making use of it in a static block seems to not be showing any response compared to a regular html file. I haven't been able to get any jquery plugin working in general. How does this CMS, especially the online version, deal with making them work?


texts: Magento 2: How to get current product name in an observer?

texts:
I am using following observer in event.xml

 <?xml version="1.0"?>
   <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
   <event name="checkout_cart_save_after">
      <observer name="vendor_module_checkout_cart_save_after" instance="Vendor\Module\Observer\CheckoutCartSaveAfterObserver" />
   </event>
  </config>

and here is my observer:

public function execute(EventObserver $observer)
{
    $product = $observer->getEvent()->getProduct();
    echo "proname: ".$product->getName();die;
}

but I am recieving following error:

Uncaught Error: Call to a member function getName() on null

Can anybody tell me how to get current product  information using above observer?


texts:
We have a site that was in Authorize.net test mode.  An order happened to go through during this time, is there anyway to resend that order, i.e. cancel & reorder...etc?

Thanks for any help.


texts: How to call phtml on every page using custom module ? Magento 1

texts:
I am trying to call phtml file in "content" of every page in magento 1.
Can you please share the steps to be followed to do it.
Thankyou


texts: Change meta tile from uppercase to lowercase

texts:
Good evening community,
I ask for help from you, because I am not an expert programmer.
I would need to change all meta tiles from uppercase to lowercase. Example :
MY PRODUCT
in
My product.
I think it is already possible from the magento back end by going to the Shop-> Configuration-> Catalog-> Auto-Generation
product fields tab and add some attributes to the name field, but I have no idea which. So I'm waiting for someone more experienced than me to give me a hand. Greetings


texts: After deleting the cart items programmatically for customer and after adding new product, shipping methods not displaying using controller magento2

texts:
Hi @ll in my case after deleting all cart items of a customer and
  after that we are adding new product to the cart. This time new
  product shipping Methods("Sorry, no quotes are available for this
  order at this time") Not displaying.

  If you guys have any idea please guide me

  Please check Code below

    <?php
    namespace Vendor\Module\Controller\Service;

    class Neworders extends \Magento\Framework\App\Action\Action{

    protected $_quoteItems;
    protected $cart;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Quote\Model\Quote\Item $quoteItems
        ) {

            $this->cart = $cart;
            $this->_quoteItems = $quoteItems;
            parent::__construct($context);
        }

        public function execute() {
          $this->deleteQuoteItems();
        }

        public function deleteQuoteItems() {
            $checkoutSession = $this->checkoutSession;
            $allItems = $checkoutSession->getQuote()->getAllVisibleItems();//returns all the items in session
            foreach ($allItems as $item) {
                $itemId = $item->getItemId();
                $quoteItem = $this->_quoteItems->load($itemId);
                $quoteItem->delete();
            }

            //Second Way

            $cartObject = $this->cart->truncate();
            $cartObject->saveQuote();
        }

}


texts:
Looking at the list of Magento cookies listed on the default "privacy-policy-cookie-restriction-mode" cms page created on install I see an entry for :

EXTERNAL_NO_CACHE
A flag, which indicates whether caching is disabled or not.

Does anyone know if this cookie is indeed in use by Magento? I can find no reference to it being set or used within the Magento code base.

Thank you.


texts: Magento customer upload images and ask form

texts:
*As the Title says, i need a CMS Page where customers can upload a jpeg/png file to prove that he/she shared a product on facebook/twitter.
The page should have Name and email fields as well.

Another CMS Page where customers can ask for a specific product, with a message after submit button is pressed that "We will look on your needs bla bla".

Thank you in advance


texts: Magento 2, how to add color swatches to custom widget template

texts:
The custom module lists certain configurable products. I need to display the color swatches, I tried below but it returns nothing!

in myTempalte.phtml

  <?php

    use Magento\Framework\App\Action\Action;

    // @codingStandardsIgnoreFile

    $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;

    /**
     * Position for actions regarding image size changing in vde if needed
     */
    $pos = $block->getPositioned();
    /**
     * Product list template
     *
     * @var $block \Magento\Catalog\Block\Product\ListProduct
     */
    $_productCollection = $this->createCollection();

    $blockVariant = $this->getLayout()
        ->createBlock('Magento\Swatches\Block\Product\Renderer\Listing\Configurable')
        ->setTemplate('Magento_Swatches::product/listing/renderer.phtml');

..... // in loop I have below for color div

       <?php if ($_product->getTypeId() == "configurable" ):?>
                            <div class="product-available-variant">
                                <?php $blockVariant->getProductDetailsHtml($_product); ?>
                            </div>
                        <?php endif?> // and rest of the loop

How to add color swatches block to widget template, below does not work:

$blockVariant = $this->getLayout()
        ->createBlock('Magento\Swatches\Block\Product\Renderer\Listing\Configurable')
        ->setTemplate('Magento_Swatches::product/listing/renderer.phtml');


texts:
I found below error in Admin Panel.

I found below error messages in debug.log file.
[2020-06-25 13:48:39] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2020-06-25 13:48:39] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2020-06-25 13:48:39] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []

How can I fix the error ?


texts:
I am a new one to Magento, How to hide theme details like WordPress in Magento?

Actually, I usually use to hide WordPress with some plugins in the same case is there any plugin for Magento?


texts: Get All Products by Category ID or Name API

texts:
I am asking this, but with some addition.

Getting Products by category id! Magento 2.1 REST

I am getting All Categories with ( I am using Magento 2 sample data )

http://www.myshop.com/rest/V1/categories

In that result for example i took Female Tops category which has id of 21 and ran request

http://www.myshop.com/rest/V1/categories/21/products

this returns me all products (50) with their SKU, But i need all data from products.

Now i tried couple of things to achieve this:

1. Get all products by their SKU which i get from their category

http://www.myshop.com/rest/V1/products?
searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=MH01&searchCriteria[filter_groups][0][filters][1][field]=sku&searchCriteria[filter_groups][0][filters][1][value]=MH02&searchCriteria[filter_groups][0][filters][2][field]=sku&searchCriteria[filter_groups][0][filters][2][value]=MH03 ...

It works, But the problem with this is it might get HTTP Error 414 URL is too long
(if there are too many products) and i think is not very efficient.

2. Get all products by their category ID

http://www.myshop.com/rest/V1/products?
searchCriteria[filter_groups][0][filters][0][field]=category_id&searchCriteria[filter_groups][0][filters][0][value]=21

This returns me 0 Products and I think I understand why, its because they are not in this category rather they are in child category (i saw that in custom_attributes key category_ids (this is in fact where they "belong")), And also this will return me all products not just bundled as I want.

Is there a better way of getting products by their categories? Without writing new APIs. I just started using magento 2 APIs and maybe i overlooked something.


texts: css is not working in magento 2 cart page

texts:
I have issue in cart page of my website . Currently home page and product pages are loading correctly but the cart page have issue  Css and js fies in the cart page is not working

Please help to solve this . I have seen this question Magento 2 StyleSheet not loading

But  I am not sure i can apply that solution . Please check .

I have tried  sudo php bin/magento setup:static-content:deploy ,but still the cart page  is same


texts: Magento 2 Clear Deleted Themes from List on the backend

texts:
On my Magento 2 Backend > Content > Configuration and theme edit

There is a dropdown with the available themes.

The problem is that it's not just showing the available theme's, it's also show themes that I've already deleted.

See the screenshot below.

How can I clear the list from the already deleted ones?


texts: Magento 2 customer dashboard link show for particular user?

texts:
I would like to show the customer dashboard "Pay trade customer link" to particular user (Ex: example@gmail.com) i have followed this link Add New inbox tab in customer my dashboard in magento 2   for adding the custom link in the customer dashboard. hence i have created a new custom module and did the changes accordingly.

Please find the screenshot:

Please suggest me how i can do this.


texts: M1: Setup upgrade/update scripts concurrent visitors

texts:
I haven't been able to get any clear answer on this and it seems like a lot of very experienced people have different views on this. So the question is:

I've made a setup install/update script + maybe some code dependent on what is configured there - like layout xml with attributes.
I deploy it live on a heavy visited page

True or false:

The first visitor will trigger and wait for all the scripts to run?
Other visitors can visit the site meanwhile with old settings?
Other visitors are just blocked until the scripts have run?
Other visitors can use the site but what data they get is totally random depending on where in time it is.
Layout xml can break if it is dependent on an attribute which isn't created (consider also flat tables)
Magento clears out cache after setup scripts?


texts: Magento 2.2.7 Pagination Block not being written to page on search results

texts:
Pagination works fine on other pages but when I do a search and the results are posted, in this case more than 20, there are no paging controls displayed at the bottom and the block hasn't been output onto the page /catalogsearch/result/index/?product_list_dir=asc&q=electric+jack.

So it's not a css thing and I can't tell where I should be looking. Fairly new to Magento so it's still confusing :)


texts: Customer registration with customer group

texts:
I want to add customer group dropdown option to customer registration

I had added below observer code for it. I added dropdown of all customer group in registration form with name (for example cgroupuser), but my code is not working:

class Customere_Group_Model_Observer
{
    public function customerRegisterSuccess(Varien_Event_Observer $observer)
    {
        try {

            $customer = $observer->getEvent()->getCustomer();
            $customer->setData('group_id', $_POST['cgroupuser']); // or whatever the group id should be
            $customer->save();

        } catch ( Exception $e ) {}
    }
}

What am I missing? If I put static val $_POST['cgroupuser'] it works fine.


texts: Page loads take around 10 minutes due to requirejs

texts:
I have a local site running Magento 2 Enterprise set up on a Hyper-V virtual machine running Ubuntu 18.04 and Nginx.  I've got 4 CPUs and plenty of RAM assigned to the virtual machine.

This same site is running quickly on a remote hosting server, even though the hosting server I'm signed up for is one of the lowest tier services (so it doesn't have a huge amount of resources).  Yet the site still runs quickly.

When I'm running this site locally, requirejs takes an unreasonably long time (10+ minutes) to load the JavaScript for a page.  Here's an example of how long it's taking to load small JavaScript files.  Everything that's being loaded is core Magento (no custom stuff) and most of the JavaScript files are 1-2 KB, with some being under 1 KB.  The largest one was 34 KB.  I'm using the default Luma theme.

What could be causing these files to load so slowly?  Each JavaScript file is tiny,  so there's no reason why the page should be hanging for several minutes or more while Magento loads JavaScript files.  What could be causing this?

I'm doing development so I don't want to turn on the merge JavaScript option while I'm still in development mode.


texts: Magento 2 payment Checkout page keep showing loader. without showing any error on console or in terminal.


texts: Filter in grid not working with Varien_Data_Collection

texts:
I have created custom collection with Varien_Data_Collection in admin grid like below :

protected function _prepareCollection() {
    $collection = Mage::getModel("catalog/product")->getCollection()
                     ->addAttributeToFilter('entity_id', array('in' => $productIds))
                    ->addAttributeToSelect($attributes)
                    ->addAttributeToSelect("sku")
                    ->addWebsiteFilter($websiteID)
                    ->addAttributeToFilter("type_id", "simple");
    $dataArray = array();

    foreach($collection as $item)
    {
        $productID = $item->getData('product_id');
        $req_qty   = Mage::helper("purchasemanagement")->getRequiredQty($productID);
        $dataArray[$item->getId()] = $item->getData();
        $dataArray[$item->getId()]['req_qty'] = $req_qty;
    }
    usort($dataArray,array($this, '_sortItems'));

    $new_collection = new Varien_Data_Collection();
        foreach($dataArray as $row){
            $rowObj = new Varien_Object();
            $rowObj->setData($row);
            $new_collection->addItem($rowObj);
        }

        $this->setCollection($new_collection);
        return parent::_prepareCollection();
}

But now i am not able to filter in this custom collection. I get the below error :

  Call to undefined method Varien_Data_Collection::addFieldToFilter() in app\code\core\Mage\Adminhtml\Block\Widget\Grid.php on line 472

I tried to follow these two links :

1) Filtering error when using custom Varien object collection in admin grid

2) Magento 1 : Filtering / Paging / Sorting with Varien_Data_Collection

but none of them worked. Can anyone tell me how to implement the solution ?

Thanks in advance.


texts:
how can i rewrite a controller (that's actually an action) in Magento 2?
I tried, as instructed here like this:

I have my own module called Namespace_Module with a di.xml file, that is taken into consideration, because the same system works on models and blocks
Example:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <!-- this one doesn't work for a controller action -->
    <preference for="Magento\Backend\Controller\Adminhtml\Dashboard\RefreshStatistics"
         type="Namespace\Module\Controller\Adminhtml\Dashboard\RefreshStatistics" />
    <!-- this one works for a model -->
    <preference for="Magento\Customer\Model\Resource\GroupRepository"
        type="Namespace\Module\Model\Resource\Customer\GroupRepository" />
     <!-- this one works also for a block -->
    <preference for="Magento\Backend\Block\Dashboard"
        type="Namespace\Module\Block\Backend\Dashboard" />
</config>

I'm trying to replace the dashboard refresh statistics with my own action. Doing it like above, the execute method in the original class still gets called and not my own.
var/cache and var/generation were cleared.


texts:
In my project , I need to have some static pages
Like, Contact Us
About Us etc

Let us suppose that these pages have similar HTML structure like below:

<header>
<left block up> <right block up>
<left block down>
<footer>

But the content for each blokc will be different for different pages

Is there anything in magento so that user can add content for these blocks from backend but the HTML will come from my xml, and user will have access to limited content only

Thanks


texts: How to Void a Transaction in Magento 2 admin?

texts:
I see no where to Void a transaction in Magento2 admin. I see I can do a credit memo and refund a transaction but I cant refund an order taken within 24 hours with Athorize.net.
I get error Authorize.Net Gateway error: E00027:The transaction was unsuccessful.
Any help would be much appreciated.


texts: Migrate database from Magento 1.3 to latest

texts: What's the best way to migrate mangento from 1.3 to latest? Do we need to register the products etc again? I want to keep everything (order history etc.)


texts: The price of a custom option displayed on invoice

texts:
I am editing this: app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php

getItemPricesForDisplay() and getItemOptions() are of my interest

public function getItemPricesForDisplay()
{
    $order = $this->getOrder();
    $item  = $this->getItem();
    if (Mage::helper('tax')->displaySalesBothPrices()) {
        $prices = array(
            array(
                'label'    => Mage::helper('tax')->__('Excl. Tax') . ':',
                'price'    => $order->formatPriceTxt($item->getPrice()),
                'subtotal' => $order->formatPriceTxt($item->getRowTotal())
            ),
            array(
                'label'    => Mage::helper('tax')->__('Incl. Tax') . ':',
                'price'    => $order->formatPriceTxt($item->getPriceInclTax()),
                'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax())
            ),
        );
    } elseif (Mage::helper('tax')->displaySalesPriceInclTax()) {
        $prices = array(array(
            'price' => $order->formatPriceTxt($item->getPriceInclTax()),
            'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax()),
        ));
    } else {
        $prices = array(array(
            'price' => $order->formatPriceTxt($item->getPrice()),
            'subtotal' => $order->formatPriceTxt($item->getRowTotal()),
        ));
    }
    //@modtom: overwrite prices
    $prices = "";

    return $prices;
}

/**
 * Retrieve item options
 *
 * @return array
 */
public function getItemOptions() {
    $result = array();
    if ($options = $this->getItem()->getOrderItem()->getProductOptions()) {

        if (isset($options['options'])) {
            $result = array_merge($result, $options['options']);
        }
        if (isset($options['additional_options'])) {
            $result = array_merge($result, $options['additional_options']);
        }
        if (isset($options['attributes_info'])) {
            $result = array_merge($result, $options['attributes_info']);

        }
    }
    return $result;
}

I need to get the price of a custom option and subtract it from the price stored in the $prices[0][price] array e.g. $prices[0][price] = $prices[0][price] - (price of a custom option);

How can I get a price of a custom option inside this function from this level of Magento?

I would probably have to somehow get the array with all the possible custom options for this item, then compare them with the one that was selected and take the price out of the array? Could you give me any tips on how to do it in Magento? How to get the array that includes the cost of the custom option?


texts:
I am trying to show an estimated delivery date to my shipping methods, I currently have this code which is displaying the date that is it today in the format of Thursday-November-2014

<?php $currentTimestamp = Mage::getModel('core/date')->timestamp(time());
        echo 'Estimated delivery date ' ;
        echo $deliverydate = date('l-F-Y', $currentTimestamp);?>

But how can I get it to add 2 days on to the date and display that?

Thank you if you can help.


texts: Event to update product price before order place

texts:
This is the second time, I am adding this question.

What event I should trigger that will update product price just before placing the order, so that admin would see the updated product price in the order.

I tried "sales_order_place_before", but its not working.

Here's my observer code:

class CustomPriceUpdate_Checkout_Model_Observer{
  public function update_price($observer){
    $quote = $observer->getEvent()->getQuote();
   foreach ($quote->getAllItems() as $item) {
       $product = $item->getProduct();//if you need it
       $additional = 23;
       $finalPrice = $item->getOriginalPrice() + $additional;
       $item->setCustomPrice($finalPrice);
       $item->setOriginalCustomPrice($finalPrice);
       $item->getProduct()->setIsSuperMode(true);
       $item->save();
     //your magic here.
    }
    $quote->save();
    Mage::log("Order is placed");
  }
}

I am seeing the system.log showing "Order is placed", but product price still showing the older price in order.

Please suggest.


texts: Why my CRON job cannot run? Is it related to my default setting?

texts:
I have a etc/cron_groups.xml set as follows:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
    <group id="cron_group_name">
        <schedule_generate_every>180</schedule_generate_every>
        <schedule_ahead_for>10</schedule_ahead_for>
        <schedule_lifetime>20</schedule_lifetime>
        <history_cleanup_every>10</history_cleanup_every>
        <history_success_lifetime>1440</history_success_lifetime>
        <history_failure_lifetime>43200</history_failure_lifetime>
        <use_separate_process>1</use_separate_process>
    </group>
</config>

I noticed that if I follow the default settings on http://devdocs.magento.com/guides/v2.1/config-guide/cron/custom-cron-ref.html, the CRON job can run properly. As I want to run CRON job every 3 hours, I set <schedule_generate_every> to 180, and adjusted other attributes as above. Have I done sth wrong on the settings?


texts: Magento Migration Redirects to the old Server

texts:
I moved my magento installation to a new server. I copied all the files,folders and mysql dump to the new server. I configured local.xml to set the new database settings. When i tried the ipaddress in the browser it took me to the default apache page with magento favicon. So I gave to 777 permissions to all the files and folder (I know its wrong). Now When i try the IPaddress in the brower it redirects me to the old magento server link.Why is this happening?

Thanks


texts: Product model hasCustomOptions function is not working in CE 1.7.0.2

texts:
I have facing problem regarding to custom option.

I have load a product  by

$CustomProduct=Mage::getModel('catalog/product')->load(2);
 if ($CustomProduct->hasCustomOptions()) {
echo $CustomProduct->getName();
 }

This product have already have custom options.The function hasCustomOptions() is not working


texts: Check to see if exception and system logging enabled

texts:
I want to programmaticly discover if the Magento exception log and system log are enabled.  In what config file would I look?  For what value?

Thank you


texts:
I am setting up Google trusted stores and I am stuck on one problem which is not compulsory but I would rather it was working.

I need to get the product ID of the item the customer has ordered

So far I have this:

$orderId = $this->getOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);

and I guess I need to get the product ID with something like...$order->get**productID**()

Also what would happen if there is multiple products?


texts: How to fix composer.json error: Unable to unserialize value?

texts:
We have installed the third party module and it's working fine. However, when we tried to open the Mageplaza>SMTP configuration via the admin panel, I'm getting the below error

Could anyone please help me with this?


texts: Magento 2: Wishlist add all to cart button -> don't add items to cart with no price and 0 quantity

texts: i am using a hide price attribute to hide the price and add tocart button for the product, on wishlist page when user clicks on "add all to cart" button, i want to restrict those product who has no price and qty. and add other products to the cart.


texts: PayPal Hosted Solution (iframe) - Pending Payment - But Paid

texts:
This is an intermittent issue, so not sure what is making it happen - but here goes.

We're using PayPal Hosted Solution - iFrame.
When some customers pay with their credit card (not express option on the iFrame) sometimes the order will get stuck at Pending Payment status.
Even though the payment is Complete (and also payment_status in returned ipn array is Completed).

Also in the Comments History, the correct Processing events are recorded.

An invoice is automatically created for the customer as well.

Sometimes a work around is to create a new Invoice and Capture Offline.
But sometimes no option is given to create a new Invoice (no Invoice button).

Any help would be really appreciated!!! No idea where to even start!

Thanks!


texts: Add custom checkbox next to custom product attribute input page in product edit page In Magento 2 backend

texts:
I created a custom attribute for product called keybrand, i allow this product attribute can be editable from magento 2 backend. Now i want to add the check box input next to this custom attribute input like this:

the checkbox should be next to the input and has some label, and the checkbox value can be accessed from the product save after observer, how can i achieve this?


texts: How to remove lib-font-face from Magento 2

texts:
I've created a theme in Magento2 which inherits from the Luma theme.  So it has inherited it's lib-font-face, which can be found in the styles-m.css

@font-face {
  font-family: 'luma-icons';
  src: url('../fonts/Luma-Icons.eot');
  src: url('../fonts/Luma-Icons.eot?#iefix') format('embedded-opentype'), url('../fonts/Luma-Icons.woff2') format('woff2'), url('../fonts/Luma-Icons.woff') format('woff'), url('../fonts/Luma-Icons.ttf') format('truetype'), url('../fonts/Luma-Icons.svg#luma-icons') format('svg');
  font-weight: normal;
  font-style: normal;
}

I don't want to use these, so it's pointless HTTP request.

How can I remove them?


texts: How To Change Currency Code Using Quote ID

texts:
I need to change the quote currency to order from the mobile app. For this, I send the quote id from the mobile app, I did the following code on Magento, but it did not work. Suggest me the correct way to change the currency code
$quote = $this->quoteFactory->create()->load(627);
$quote->setQuoteCurrencyCode('USD');
$quote->save()


texts: Want to create Magento Best Seller Extension into home page

texts: I am new in magento . I want create new block for "Best selling product" in home page. How can I get "Monthly Best selling product" in Magento 2? Any free extension for this or How to do programatically? Anyone help?


texts: Magento/php: adding product to cart with custom details and price

texts:
(Magento 1.9) I created a form to be able to customize a product and generate a preview sketch of what the end result would look like with a cost (this was done outside of Magento as an individual program). Now I integrated this into a Magento page in a custom frontend template.

Now I am trying to add this to the cart. Considering each customer might order several versions of the product, each with its unique details, I was experimenting with creating a new simple product for each version (it seems that if I try to add them as the same product, magento groups them together with the same price), before adding it to the cart. However, I am having trouble actually adding the product into the cart. This is my code so far for adding to cart:

<?php
// Mage init
require_once Mage::getBaseDir() . '/app/Mage.php';
umask(0);
Mage::getSingleton('core/session', array('name' => 'frontend'));

// Get customer session
$session = Mage::getSingleton('customer/session');

// Get cart instance
$cart = Mage::getSingleton('checkout/cart');
$cart->init();

// Add a product with custom options
$productInstance = Mage::getModel('catalog/product')->load(Mage::getModel('catalog/product')->getResource()->getIdBySku('testsku17'));

$param = array(
    'product' => $productInstance->getId(),
    'qty' => 1
);
$request = new Varien_Object();
$request->setData($param);
$cart->addProduct($productInstance, $request);  // This line tends to break my code regularly (meaning everything halts when I leave it in)

// update session
$session->setCartWasUpdated(true);

// save the cart
$cart->save();

echo "added to cart <br>";
?>

Can anyone help me figure out what I'm doing wrong?


texts: Magento 2 Make products clickable in items ordered

texts:
Is there any way to get the product name clickable and so that It leads to the specific product page?

I was looking at this before but there was no answers:
https://community.magento.com/t5/Magento-2-x-Feature-Requests-and/Make-products-clickable-in-sales-order-view-direct-link-to/idi-p/136197


texts: How to add currency symbols into the currency list?

texts:
How can I add currency symbols into the currency list?

This is the code,

<?php if($this->getCurrencyCount() > 1): ?>
<div class="form-micro">

    <select onchange="window.location.href=this.value" name="custom-currency-selector" id="custom-currency-selector">
        <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
        <option value="<?php echo $this->getSwitchCurrencyUrl($_code)?>"
            <?php if($_code == $this->getCurrentCurrencyCode()): ?>
                selected="SELECTED"
            <?php endif; ?>>
            <?php echo $_name ?>
        </option>
        <?php endforeach; ?>

    </select>
</div>
<?php endif; ?>

will output,

    <option ...>Euro</option>
    <option ...>British Pound</option>
    <option ...>Danish Krone</option>
    <option ...>Swedish Krona</option>
    <option ...>Swiss Franc</option>
    <option ...>United States Dollars</option>

But I need to add their symbols after the text,

    <option ...>Euro &euro;</option>
    <option ...>British Pound &pound;</option>
    <option ...>Danish Krone DKK</option>
    <option ...>Swedish Krona SEK</option>
    <option ...>Swiss Franc CHF</option>
    <option ...>United States Dollars $</option>

Is it possible?


texts:
Can a customer avoid sales tax during checkout if they turn off javascript in their browser? Does the State dropdown get validated?

Is there a built in solution?


texts: Magento V2 - changing attribute set never updates and I see a continuous please wait

texts: Any time I attempt to update the attribute set from default to another attribute set, the product never updates and the settings never save. I get a continuous please wait spinning gif. Also in my dev tools console, I get a JS error as seen below. Any thoughts on what may be going on. This seems to be related to the Magento V2 upgrade done recently. I am not sure if the JS error is related or not but I wanted to at least mention it.


texts: Programmatically increase package weight

texts:
I'm trying to write some code that will add a fixed amount of weight to orders, to account for packaging material.

I've over-rideden Mage_Shipping_Model_Rate_Request with this code, in app/code/local/Modulename/Shipping/Model/Rate/Request.php:

class Modulename_Shipping_Model_Rate_Request extends Mage_Shipping_Model_Rate_Request {
    public function setPackageWeight($weight) {
        $weight += 0.23;
        parent::setPackageWeight($weight);
    }
}

It's definitely being run, because when I add logging to it, it's showing up in the logs; but when I export the order, I'm just seeing the weight of the actual items showing up.

So I'm clearly doing something wrong, but I don't know what. I figure I'm over-riding the wrong method, or doing so in the wrong way. But I'm stuck trying to figure out what right way of doing this will be.

Update

Having been poking around more, it looks like the API access uses a specific model for accessing orders, but I've not been able to figure out which one to over-ride the correct method - it's somewhere under Mage_Sales_Model_Order, I'm sure.

Update, again

This is the current config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Modulename_Sales>
            <version>0.1.0</version>
        </Modulename_Sales>
    </modules>
    <global>
        <models>
            <sales>
                <rewrite>
                    <order>Modulename_Sales_Model_Order</order>
                </rewrite>
            </sales>
        </models>
    </global>
</config>


texts: Magento 2 Adding custom parameter to the ajax url, from the admin grid row issue

texts:
I am on the edit page with the following url:

https://local.magento/admin/hello_test/shipping/edit/shippingmethod_id/1/key/df70da11cddd2ee1c41aa67a8cbccf6d9403207740547719560dec30a3fd9ceb/

, where I loaded a custom grid. When I want to edit the price column and press the save button, I would like to pass to the ajax url an extra paramater, from the UI component XML.

This is what I tried:

    <columns name="my_columns">
        <settings>
            <editorConfig>
                <param name="selectProvider" xsi:type="string">custom name</param>
                <param name="enabled" xsi:type="boolean">true</param>
                <param name="indexField" xsi:type="string">entity_id</param>
                <param name="clientConfig" xsi:type="array">
                    <item name="saveUrl" xsi:type="url" path="hello_test/Shipping/inlineEdit">
                        <param name="shippingmethod_id">{i would like here to include the shippingmethod_id value from my edit page url}</param>
                    </item>
                    <item name="validateBeforeSave" xsi:type="boolean">false</item>
                </param>
            </editorConfig>
....

In the <param name="shippingmethod_id"> i can include static values(and it works), but i would like to include the value of the shippingmethod_id from the edit page url . Is that possible ? :)

Thnx


texts: How to set cookie SameSite=None instead of SameSite=LAX

texts: In Magento 2, how do I set the cookie SameSite=None so that the server will not default to SameSite=LAX. For more info refer to the image below. Thanks in advance


texts: Is it possible to remove "Home" link from category navbar in magento 2?

texts: I want to remove the Home link which we by default get in category navigation bar in Magento 2 version.


texts: How do exactly mean multi vendor in magento?

texts:
I am using magento CE 1.7.0.2 and now i am getting confuse in multi vendor system, i am not clear about munti vendor and how can i manage it. I have to manage multi store where products will be store wise.

So can i manage products store wise and define vendor for it ? I didn't get any relational answer from google.


texts: My test e-mail is working, but any other e-mail not working on Magento 2

texts:
My test e-mail is working, but any other e-mail is not working on Magento 2.2.2 version.
I haven't use Cron job, I am using default Magento functionality.
I have already Disable "Asynchronous sending"
Earlier my email is working but when i updated version 2.1.2 to 2.2.2. Email is not working.
Thanks.


texts: Magento SOAP API: How to get SOAP response using JavaScript

texts:
I'm able to get SOAP response using Magento SOAP API by using PHP code. Now I want it using JavaScript/AJAX request.
How can I accomplish this? What steps should I follow prepare my Magento to allow AJAX http API request?
I tried with the following code for response:

$.soap({
      url: 'https://www.yourdomain.com/api/soap/?wsdl',
      method: 'login',

      data: {
          username:'xxxxx',
          apiKey:'xxxx'
      },

      success: function (soapResponse) {
          alert("yes!!");
      },
      error: function (SOAPResponse) {
          alert(SOAPResponse.toString());
      }
  });

I get this JavaScript error:

XMLHttpRequest cannot load https://www.yourdomain.com/api/soap/?wsdllogin. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 500.


texts: Warning: file_put_contents in plugin-list.php and PluginListGenerator.php in Magento 2.4.2 during compilation

texts:
While compilation the Magento 2.4.2 experienced following error
Warning: file_put_contents(ProjectName/generated/metadata/primary|global|plugin-list.php):
failed to open stream: No such file or directory in ProjectName\vendor\magento\framework\Interception\PluginListGenerator.php on line 414