texts: CSV import not working - Need Assistance

texts:
We have a scenario where schools.csv file will be uploaded under schoolsearch folder under the Magento root directory. This should update the schools table under Magento database. But since migration its not working. We are using a module for this task. But its not working. The following is the content of observer.php

class Attigo_Schoolsearch_Model_Observer
{
    protected function getfilepath()
    {
        Mage::getBaseDir(). DS .'csv'. DS . 'schoolsearch/schools.csv';

    }

    public function schoolDetail()
    {

        $row=array();
        //$filePath = $this->getfilepath();
        $filePath = "/var/www/html/main/schoolsearch/schools.csv";

    if (($handle = fopen($filePath, 'r')) !== FALSE)
        {
            $i=0;
            while (($data = fgetcsv($handle, 1000, '\t')) !== FALSE)
            {

                    if($i==0)
                    {
                        $i++;
                        continue;
                    }

                     if($data != "")
                     {
                        foreach ($data as $school) {
                         //   echo $school.'';
                           $row=explode("\t",$school);

                        }

                        $school = Mage::getModel('schoolsearch/schools');

                        $school->setKundnr($row[0]);
                        $school->setSkola($row[1]);
                        $school->setBadress($row[2]);
                        $school->setBadress1($row[3]);
                        $school->setBpostnummer($row[4]);
                        $school->setBpostort($row[5]);
                        $school->setFakturamottagare($row[6]);
                        $school->setFakturaadress1($row[7]);
                        $school->setFakturaadress2($row[8]);
                        $school->setFpostnr($row[9]);
                        $school->setFpostort($row[10]);
                        $school->setBadressid($row[11]);
                        $school->setFakturaadressid($row[12]);
                        $school->setBcountrycode($row[13]);
                        $school->setFakturacountrycode($row[14]);
                        $school->save();

                       // print_r($school);
                       // echo $row[13].'->'.$row[14].'';

                     }

            $i++;
            }
        }
        else
        {
            echo "permission denide";
        }
    }
    public function AddCustomerGroup(Varien_Event_Observer $observer)
    {
            $_post = Mage::app()->getFrontController()->getRequest()->getParams();

        try {

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

            $customer->setData('group_id', $_post['group_id']); // or whatever the group id should be
            $customer->save();

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

    }

}

Can any one help me where it goes wrong?


texts: price differs before log in and after log in

texts: Am using magento 1.9.2.3. The problem am facing is that when I login the price of the product in the catalog is displayed including the tax amount and when logged out the prices are displayed without including the tax amount. Is there anything I should change at backend?


texts:
Knowing I want Magento assemble and execute the following query :

UPDATE
    `catalog_product_entity_media_gallery_value` AS `tGV`
INNER JOIN `catalog_product_entity_media_gallery` AS `tG` ON
    `tG` . value_id = value_id
SET
    `tGV` . `position` = 2
WHERE
    (
        `tG` . `value` LIKE '%_pms_%'
    )

I came to the following code :

$select = $connection
    ->select()
    ->join(
        ['tG' => $tableGallery],
        '`tG`.`value_id` = `tGV`.`value_id`',
        ['position' => new Expr('2')]
    )
    ->where("`tG`.`value` LIKE '%_pms_master%'");

$update = $connection->updateFromSelect($select, ['tGV' => $tableGalleryValue]);

$connection->query($update);

This code works but it is not obvious to understand and therefore to maintain. Question is : do you have any idea how to do better : simpler / cleaner / more understandable ?


texts: How to insert a Grid with some columns inside an admin form?

texts: I need to insert a grid inside the admin form having two columns and each row should be having a delete button. Is there a way to achieve this


texts:
I use Paypal under Magento 1.9 and it happens once or twice a week that orders are in payment verification status. It lasts about 15 days. During this period of time the product sold is still available on the site because the stock is not deducted for this status. How do you make sure it is the same as for pending orders by check or wire transfer?
Thanks for your help


texts: How to show 'list of reviews' on product detail page?

texts:
How can I show a detailed list of respective product reviews at the end of product detail pages? I used this code at view.phtml

<?php if($_product->getRatingSummary()): ?>
    <?php echo $this->getReviewsSummaryHtml($_product) ?>
<?php endif; ?>

But it is showing only short summary (like number of reviews) instead of detailed review summary.

I mm using the RWD theme.


texts:
I have been working on SEO for multi store Magento but facing error of duplicate contents especially for product pages.
Case 1:
Client wants to keep the Category Url in product page but this is indeed giving us the duplicate content issues.
Looking at the backend settings for SEO, we have the following key player settings for SEO:

Use Categories Path for Product URLs = Yes
Use Canonical Link Meta Tag For Categories = Yes
Use Canonical Link Meta Tag For Products = Yes

Case 2:
We are using multi website as per country in sub-directory. For example:

http://mystore.com/uk/ -> for UK
http://mystore.com/us/ -> for US
http://mystore.com/fr/ -> for FR

And all the websites have the same catalog products. So we will have same product content in all the websites. For example:

http://mystore.com/uk/men/shirt/polo-red.html
http://mystore.com/us/men/shirt/polo-red.html
http://mystore.com/fr/men/shirt/polo-red.html

Note that we are using the following rel="alternate" meta tags for above product page as:

<link href="http://mystore.com/us/men/shirt/polo-red.html" hreflang="en-us" rel="alternate"/>
<link href="http://mystore.com/uk/men/shirt/polo-red.html" hreflang="en" rel="alternate"/>
<link href="http://mystore.com/fr/men/shirt/polo-red.html" hreflang="en" rel="alternate"/>

Query:
What is the best SEO optimisation technique in order to solve the issue of duplicate content issue for product pages for above cases?

Any help/suggestion is really appreciated.
Thanks


texts:
I created an external WebApp that communicates via REST API to my Magento instance (Magento version installed is 2.1.13).
This WebApp will be used by shop's operators to sell the same shop products to physical customers at certain events.
These operators will create a quote (cart) with customer items and they then will register the customer to Magento (if he/she is not registered yet) and place the order for them.
Now my doubt comes in: is there a way to associate the shop operator with the order?
The operator will be an admin user with limited permission (customer and order management), and ideally, I would be able to filter the order by shop operator.
Is this possible?


texts: Redirect home page with example.com// in magento 2

texts: Hello I just Moved My Website and I am getting Error in home page page is not redirect properly Home page is open with 2 slash www.example.com//


texts: How to remove file in session large folder

texts:
Please help me how to remove file in session large folder (because inodes used is 100%)

This is my problem

# du -a /var | sort -n -r | head -n 10
13654960        /var
12763132        /var/www
12278932        /var/www/html
12278928        /var/www/html/magento
11416564        /var/www/html/magento/var
7470108 /var/www/html/magento/var/session
3941824 /var/www/html/magento/var/log
3941820 /var/www/html/magento/var/log/system.log
701992  /var/www/html/magento/media
519024  /var/www/html/magento/media/catalog

i can't view file in session folder in ftp

then i run: rm -rf path/var/session/*  but not work.

i think because my session folder is large.

Can i get any  help and suggestion.


texts: How can I remove Block Programatically from layout

texts:
I want to remove the block.

so

How can I remove Block Programmatically from layout?


texts:
Trying to find a particular login Form which pops up randomly in my Magento 2 website, please check the screenshot below.

I have enabled path hint, but not getting its location, any other way to find this file.. please let me know


texts: Adding "More Info" Button To Product Category/Listing Pages

texts: I would like to show "More Info" button (as opposed to add to cart) for some of my products. How can I do that? Thanks


texts: I want to a show a loader during the execution of an observer in magento 2. How can I show the loader?

texts: In an observer to an event, I am creating new products,it takes some time for the products to be created. I want to show loader during this wait. How is it possible?


texts:
When I want to sort products by price (low to high and high to low), my link is not working.  Option value is "price&product_list_dir=asc", which encode in "price%26product_list_dir%3Dasc".
How can I decode that url?

Here is my code:

<?php /* @escapeNotVerified */ echo __('Sort by') ?>
<select id="sorter" data-role="sorter" class="sorter-options selectpicker">
    <?php
        $url = $_SERVER['REQUEST_URI'];
        $path = strstr($url, '?');
    ?>
    <option
        <?php if($path == '?product_list_order=price&product_list_dir=desc'): ?>
            selected="selected"
        <?php endif; ?>
        class="high-low" value="price&product_list_dir=desc">
        Price - High to low
    </option>
    <option
        <?php if($path == '?product_list_order=price&product_list_dir=asc'): ?>
            selected="selected"
        <?php endif; ?>
        class="low-high" value="<?php /* @escapeNotVerified */ echo __('price&product_list_dir=asc') ?>">
        Price - Low to high
    </option>
</select>


texts: How to get the language code of an order?

texts:
With the order id, how to retrieve the language code from the order or from the user ?
(anything that looks remotely like EN, ES, FR, or en_UK, fr_FR).

For example : if the user has been on a website based on Magento 2.x , he browses the website in Russian, and he buys a chocolate bar Wonka Bar. His order id is 13371337.

How could one get "ru_RU" later on (the user is not logged in anymore) programatically ?


texts: layered navigation - best way to edit robots meta tag when 0 results

texts:
I'm trying to decide the best\most efficient way to detect that the product collection on the category pages contain no results and change the metarobots tag on the head block. I already do something similar using an observer for urls with sort direction parameters etc but the event i use (controller_action_layout_render_before_catalog_category_view) is too early to inspect the product collection, or at least i think it is!

I'm a user of amasty's improved navigation so the layered navigation is a little non standard, but i know the extensions code well enough to modify it if given a pointer in the right direction.

So, any ideas on the best/most efficient way to achieve this? thanks for your time.


texts: How to use cookie-free domains in magento 2

texts: I have recently create gtmetrix report for my site, in that report I found Use cookie-free domains to 0 means nothing. My question is that how to use cookie free domain in magento 2.2.6


texts: when i select custom shiping method my other shipping methods not working in magento 2

texts:
i have two shipping methods

  1)Custom shipping
  2)Free shipping

when i select custom shipping it works fine

when i choose free shipping

showing error on checkout

  undefined index : pickupStoreVal     /checkoutobserver.php on line 70

checkoutobservershipping.php

namespace Mageants\StorePickup\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;

class SaveStorePickupToOrderObserver implements ObserverInterface
{
    /**
     * @var \Magento\Framework\ObjectManagerInterface
     */
    protected $_objectManager;
    /**
     * Store Collection
     *
     * @var \Mageants\StoreLocator\Model\ManageStore
     */
    protected $_storeCollection;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectmanager
     */
    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectmanager,
        \Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Mageants\StoreLocator\Model\ManageStore $storeCollection
        )
    {
        $this->_storeCollection = $storeCollection;
        $this->_objectManager = $objectmanager;
        $this->countryInformation = $countryInformation;
        $this->scopeConfig = $scopeConfig;
    }

    public function execute(EventObserver $observer)
    {
        $order = $observer->getOrder();
        $quoteRepository = $this->_objectManager->create('Magento\Quote\Model\QuoteRepository');
        $quote = $quoteRepository->get($order->getQuoteId());
        $order->setPickupDate($quote->getPickupDate());
        $order->setPickupStore($quote->getPickupStore());
        $collection = '';
        $store = '';

       /*  $id = $_COOKIE['pickupStoreVal'] ?? false;
        if ($id)
        {
        $collection = $this->_storeCollection->getCollection()->addFieldToFilter('store_id', $id);
        }*/

        if ($_COOKIE['pickupStoreVal'])
        {
            $id = $_COOKIE['pickupStoreVal'];
            $collection = $this->_storeCollection->getCollection()->addFieldToFilter('store_id', $id);
        }

          foreach ($collection->getData() as $stores)
        {
            $store = $stores;
        }
        if ($order->getShippingMethod() == "storepickup_storepickup")
        {
            $storeName = explode(' ', $store['sname']);
            $streetAddress = array($store['address']);
            $firstName = '';
            $lastName = '';

            if (count($storeName) == 1)
            {
                $firstName = "Store";
                $lastName = $storeName[0];
            }
            elseif (count($storeName) > 2)
            {
                $firstName = $storeName[0];
                for ($i=1; $i < count($storeName); $i++)
                {
                    $lastName = $lastName." ".$storeName[$i];
                }
            }
            else{
                $firstName = $storeName[0];
                $lastName = $storeName[1];
            }

            $order->getShippingAddress()->setFirstname($firstName);
            $order->getShippingAddress()->setLastname($lastName);
            $order->getShippingAddress()->setStreet($streetAddress);
            $order->getShippingAddress()->setCity($store['city']);
            $order->getShippingAddress()->setPostcode(trim($store['postcode']));
            $order->getShippingAddress()->setRegion(trim($store['region']));
            $order->getShippingAddress()->setCountryId(strtoupper(trim($store['country'])));
            $order->getShippingAddress()->setTelephone(trim($store['phone']));
            $order->getShippingAddress()->setCompany('');
        }
        return $this;
    }
}

how i can solve this???


texts: Finding the best approach to "Add a recipe module to Magento"

texts:
What is the best approach to add a recipe module to Magento.

The thing I would like to avoid is to add database-tables to Magento core which later it might cause problems.

There should be relationships between grocery products on Magento and the recipes.

The user chooses the recipe and should be able to add the products of the recipe to the cart by one click.

Is API approach a good solution?
Please share your thoughts I appreciate it.

Example:
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Fwww.marked.no%2Fmat%2Fbarnas-p%25C3%25B8lsefavoritt


texts: Why would you add the modules array in app/etc/config.php to source control?

texts:
As of Magento 2.2 it's recommended to add config.php to your source control to facilitate pipeline deployment. I have some questions and issues with this. I'm hoping somebody can share their experience and give me some insights into this recommendation.

A very simplified way to describe the deployment process would be that the Magento build steps are executed in this order:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento setup:upgrade --keep-generated

By adding certain configuration to config.php step #1 and #2 can be executed without a connection to a database and thus on a separate server without turning on maintenance mode. You'll always need a connection to the database for step #3.

In config.php there are 3 arrays that you'll need before you can run step #1 and #2: modules, system and scopes.

I have an issue with adding config.php to my source control because of the modules array. I'll explain why.

In the modules array Magento adds the modules in a specific order determined by the <sequence/> tags in the module.xml files. It's not recommended to change this manually. The state of the module (enabled or disabled) is also stored in modules.

I've run some tests and for the setup:di:compile and setup:static-content:deploy it doesn't seem to matter if a module is added to the modules array. Magento will still compile and deploy the files for that module.

When running setup:upgrade Magento will regenerate the modules array and will override the previous order if necessary.

So it seems that modules is necessary for setup:di:compile and setup:static-content:deploy but the actual content of the modules array doesn't really matter.

When working with feature branches and release branches in your GIT repository config.php is a file that becomes prone to merge conflicts. And because it's not recommended to manually change this file, you need to let Magento regenerate it which is kind of a hassle when merging pull requests.

How do you manage config.php?
Does anyone know a good reason why is modules necessary before running setup:upgrade?


texts: How to fix "Cannot send headers; headers already sent" error in magento version 1.9.3.3?

texts:
a:5:{i:0;s:147:"Cannot send headers; headers already sent in
  /home/abc/public_html/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php,
  line 1";i:1;s:1783:"#0
  /home/waterc/public_html/lib/Zend/Controller/Response/Abstract.php(115):
  Zend_Controller_Response_Abstract->canSendHeaders(true)

If you have any idea please help me to fix this issue.

Thanks


texts: Sessions writing to database instead of Redis

texts:
I have configured Magento to use Redis to store sessions a number of times but currently have an issue where Magento writes session data to the database instead of Redis even though it appears to be configured correctly.

Redis is running and I have double checked the ports are correct / I can connect to it via cli. I am using a new version of Magento so it should natively support this. My Magento configuration is set to use db under the session_save node.

I have taken this from local.xml.additional and understand that the Redis module extends the model that the db session storage mechanism uses, but cannot see why this would not be saving to Redis.

Any ideas?

Indeed the solution is not to forget to activate the Redis session module (Cm_RedisSession.xml) and flush configuration cache.


texts: Redirecting to Dashboard while clicking on Print button in Magento 2 backend

texts:
I have created a custom button, I am trying to print order details.
I am using plugin for this

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\Sales\Block\Adminhtml\Order\View">
    <plugin name="addMyButton" type="Pulsestorm\MenuTutorial\Plugin\Block\Adminhtml\Order\View"/>
   </type>
</config>

View.php

 <?php
namespace Pulsestorm\MenuTutorial\Plugin\Block\Adminhtml\Order;

class View{
   protected $urlBuider;
   public function __construct(
    \Magento\Framework\UrlInterface $urlBuilder
   ) {
       $this->urlBuilder = $urlBuilder;
     }
    public function beforeSetLayout(\Magento\Sales\Block\Adminhtml\Order\View $view)
  {
    $url = $this->urlBuilder->getUrl('pulsestorm_menututorial/print/order_id'.$view->getOrderId() );
    $newString = implode('/',str_split($url,73));
    //$url = '/mymodule/controller/action/id/' . $view->getOrderId();

    $view->addButton(
        'order_myaction',
        [
            'label' => __('CustomPrint'),
            'class' => 'print',
            'onclick' => "setLocation('{$newString}')"
        ]
    );
  }
}

Controller path is Pulsestorm\MenuTutorial\Controller and Controller name is PrintAction

When i clicking CustomPrint button it is redirecting me on dashnoard. please help.


texts: translate "Please enter the same value again"

texts:
I am trying to change the validation message Please enter the same value again for password field using translate csv.but it's not translate on the frontend.
Can any one please guide here what's wrong with this.
I am using magento 2.4


texts: Magento 2 move tax section in to grand totals in cart page

texts:
I want to move the tax in between the order total incl tax and order total excl tax in the cartpage.

The Tax section is in the vendor/magento-tax/view/frontend/web/template/checkout/cart/totals/tax.html
And the order totals in vendor/magento-tax/view/frontend/web/template/checkout/cart/totals/grand-total.html
How can I do it?


texts: Replacing current quote with a stored Quote

texts:
Background:

There is a store with two sites and shopping cart has to be shared among the two. To facilitate this, I set a field in session and store the quote-id in it. When we switch store, the quote is loaded from database.

Problem: Currently the quoteid is being passed successfully but we're unable to replace the quote. I tried quote->merge and Mage::getSingleton('checkout/session')->setQuote / setQuoteId, but with no success. I can see the correct quote number being passed among sites.

Every constructive suggestion is welcomed.


texts: Magento 1: How to add watermark only for a single category images?

texts:
I have lots of category in my Magento like Electronics, Fashion etc.
But I want to display watermark for Electronics category only. I uploaded water for system configuration but it is applying for all images.

Can anyone tell me how to restrict watermark for one category images only.


texts: Magento 2 Not getting JS and CSS after server change

texts:
I am working on magento 2.1.10

It is working fine on local server, each time I make any changes in CSS or add any custom modules the changes are online on frontend after I upgrade, content deploy and flush cache from terminal.

But I am trying to move this installation to other servers. Compressed the whole project and extracted on target server and also added database with all suitable changes, made changes in env.php for database connectivity.

Following things I have tried:

Remove cache and static content.

Now, when I run these commands for upgrade, content deploy and flush cache there is still no css or js loading on frontend.

I have also changed ownership of magento's root dir on server to the user from which I am logged in in CLI, added this user to appache's user group, again ran these commands in terminal still facing the same issues.

Is there anything that I am missing here?

I have tried to move it on 2 different servers but still CSS and JS are not loading.

Note: If I am installing a fresh magento on these servers then there are no issues on both these servers.


texts: Delete custom options programmatically if more then 1

texts:
I'm adding a custom option (checkbox with 2 rows) programmatically to simple products (10.000+) after a import. All custom option values are the same.

Due to a memory issue it failed the first time (partially) and after setting a higher memory limit some products now have 2 custom options.

Is there a way get the amount of custom options through a collection and  delete any second (or more) custom options so every product has only 1 custom option?


texts: import question - can you just import SKU, price, qty?

texts:
i want to do an upload on Magento which doesnt involve uploading every column - eg product_type, categories etc

i have all that data in - i just want to update my pricing and quantity, is that possible?


texts: Magento 2 Redirect to cart page on event 'sales_order_place_before'

texts:
I'm using Magento 2.1.3

I have an observer 'sales_order_place_before', I want to validate some information before the payment is made and if validation is false, I want to redirect the page to 'checkout/cart' with error message.

Please see the below code , my page is response is being rendered but not redirected. Thanks!

Observer file

Vendor/Module/Observer/ValidateUserDetails.php

<?php

namespace Smartshore\Incase\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Message\ManagerInterface;

class ValidateUserDetails implements ObserverInterface
{

    protected $messageManager;
    protected $_responseFactory;
    protected $_url;

    public function __construct(\Magento\Framework\Message\ManagerInterface $messageManager,
        \Magento\Framework\App\ResponseFactory $responseFactory,
        \Magento\Framework\UrlInterface $url
    ) {
        $this->messageManager = $messageManager;
        $this->_responseFactory = $responseFactory;
        $this->_url = $url;
    }

    /**
    * @param EventObserver $observer
    * @return $this
    * @SuppressWarnings(PHPMD.CyclomaticComplexity)
    */
    public function execute(EventObserver $observer)
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $helperFactory = $objectManager->create('Smartshore\Incase\Helper\Data');

        $order = $observer->getOrder();
        $orderData = $order->getData();

        $urlInterface = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\UrlInterface');
        $url = $urlInterface->getUrl('/');

        $customerId = $orderData['customer_id'];
        $customerEmail = $orderData['customer_email'];
        $customerFirstname  = $orderData['customer_firstname'];
        $customerMiddlename = $orderData['customer_middlename'];
        $customerLastname = $orderData['customer_lastname'];

        $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
        $items = $cart->getItems();

        $infoArr = array();

        if (!empty($items)) {

            foreach ($items as $key => $item) {

                $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
                $customOptions = $options['options'];

                if (!empty($customOptions)) {

                    $infoArr[$customerEmail][] = array(

                        'userData' => array(
                            'email' => $customOptions[0]['value'],
                            'dob' => $customOptions[1]['value'],
                            'firstName' => $customOptions[2]['value'],
                            'lastName' => $customOptions[3]['value']
                        ),

                        'trainingId' => $customOptions[4]['value']
                    );
                }
            }
        }

        if (!empty($infoArr)) {

            //runCurl and get response

            $response = array('status' => 'error');

            if (isset($response['status']) && $response['status'] == 'error') {

                $this->messageManager->addError(__('We can\'t void the payment right now.'));

                $cartUrl = $this->_url->getUrl('/');
                $this->_responseFactory->create()->setRedirect($cartUrl);
            }
        }
    }
}

events.xml file

Vendor/Module/etc/webapi_rest/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="sales_order_place_before">
       <observer name="order_place_before" instance="Smartshore\Incase\Observer\ValidateUserDetails" shared="false" />
    </event>
</config>


texts: How to use if else in cms block magento 1.x

texts:
I want use if else like this code but it not working. Please help me

{{if config path="system/config/path" == 1}}
<p> ok </p>
{{else}}
<p> no </p>

I create it in home page, menu->cms->page


texts: I have very very simple general question. Is Magento using soft delete or hard delete for table records? If its using hard delete means, what is the reason? why we are not following soft delete?


texts: Disabled SID from backend but still showing onlyon homepage

texts:
Runnning Magento 2.1.7, with php7.0

I disabled "Show SID on front end" in my Magento backend, but yet the home page of my site still shows www.mydomain.com/?SID=XXXXXXXXXXXXXXXXX

I tried doing this in my .htaccess file as recommended by other people:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

But that makes a 500 error "too many redirects".  Any ideas? Here is what my .htaccess file looks like:

RewriteEngine on
RewriteCond %{REQUEST_URI} XXXXXXXXX
RewriteCond %{REQUEST_URI} xxxxxxxxxxxxxx/pki-validation/xxxxxxxxx9]xxxxxxxxxComodo\xxxxxxx
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteCond %{REQUEST_URI} xxxxxxxxxxxxx
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validationxxxxx Comodo\ xxxxxxxxxx
    RewriteRule .* - [L,R=405]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !xxxxxxxxxxcpaneldcv$
RewriteCond %{REQUEST_URI} xxxxxxxx.well-known/pki-validation/xxxxx
    RewriteRule .* index.php [L]


texts: Invalid arguments supplied for foreach() in module-catalog/Model/ProductLink/CollectionProvider.php magento 2.1.2

texts:
I am trying to get a collection of custom link type called customtype along with related and upsell,In admin while click on a product it will throw an error like

  Invalid arguments supplied for foreach() in module-catalog/Model/ProductLink/CollectionProvider.php line-51.

But in the case of related products in my case the below code return an empty array and there is no issue, why this is happening ?

public function getRelatedProducts()
{
    if (!$this->hasRelatedProducts()) {
        $products = [];
        $collection = $this->getRelatedProductCollection();
        foreach ($collection as $product) {
            $products[] = $product;
        }
        $this->setRelatedProducts($products);
    }
    return $this->getData('related_products');
}

Related product collection

/**
 * Retrieve collection related product
 *
 * @return \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection
 */
public function getRelatedProductCollection()
{
    $collection = $this->getLinkInstance()->useRelatedLinks()->getProductCollection()->setIsStrongMode();
    $collection->setProduct($this);
    return $collection;
}

My custom code is below,

 public function getCustomtypeProducts()
{
    if (!$this->hasCustomtypeProducts()) {
        $products = [];
        $collection = $this->getCustomtypeProductCollection();
        foreach ($collection as $product) {
            $products[] = $product;
        }
        $this->setCustomtypeProducts($products);
    }
    return $this->getData('customtype_products');
}

Collection provider

public function getCollection(\Magento\Catalog\Model\Product $product, $type)
{
    if (!isset($this->providers[$type])) {
        throw new NoSuchEntityException(__('Collection provider is not registered'));
    }

    $products = $this->providers[$type]->getLinkedProducts($product);
    $converter = $this->converterPool->getConverter($type);
    $output = [];
    foreach ($products as $item) {
        $output[$item->getId()] = $converter->convert($item);
    }
    return $output;
}

di.xml

 <type name="Magento\Catalog\Model\Product\LinkTypeProvider">
    <arguments>
        <argument name="linkTypes" xsi:type="array">
            <item name="alsobought" xsi:type="const">vendor\ProductLink\Model\Catalog\Product\Link::LINK_TYPE_ALSOBOUGHT</item>
            <item name="companion" xsi:type="const">vendor\ProductLink\Model\Catalog\Product\Link::LINK_TYPE_COMPANION</item>
        </argument>
    </arguments>
</type>
<type name="Magento\Catalog\Model\ProductLink\CollectionProvider">
    <arguments>
        <argument name="providers" xsi:type="array">
            <item name="alsobought" xsi:type="object">vendor\ProductLink\Model\Product\Link\CollectionProvider\Alsobought</item>
            <item name="companion" xsi:type="object">vendor\ProductLink\Model\Product\Link\CollectionProvider\Companionstyles</item>
        </argument>
    </arguments>
</type>


texts: Magento 2 + Product Meta title display in place of Product Name

texts:
Facing some weird issue, Product Meta title display rather than product title or product name on the product detail page on the front end.

Magento version 2.2.8


texts: How to capture automatically Paypal authorization payment?

texts:
The payment action of PayPal it's set to authorization (I need it, I can't set to sale), therefore then I need to capture the payment.

I know that I can do it manually from the invoice sending page, but I need to capture the payment automatically after 6 hours from the order time.

Could you suggest how to do that cron, and the function to capture the money automatically after 6 hours?


texts: Magento2 How to add footer menu an additional column

texts: I am using the Luma for default temple - i know i can edit the column already there in my default XML file - how do i go about copying my current footer from my magento1.9 to magento2 footer?  my current footer has 4 columns


texts: After Data Migration Product Listing Not Showing

texts:
I've migrated(using Magento tool) from M1.8.1.0 To M2.2.4, Migration has done but product listing not showing on M2 site while products have assigned to all categories successfully after migration.

When I update a product without any modification from the admin then it shows on the product listing page corresponding to the assigned category.

It means that I've to update products to show in their categories.

Is this migration bug? how can I resolve this issue easily?

Thanks!!!


texts: How can i show final price on product page?

texts: I want to show price accroding to selected attribute option of configurable product.


texts: Magento 1: Add custom attribute in transactional e-mail

texts:
In transactional mail, I need to add a custom attribute.

I modified the below files
app/design/frontend/base/default/template/email/order/items/order/default.phtml
app/design/frontend/base/default/template/email/order/items/invoice/default.phtml

But changes are not reflecting on a mail.

I also flushed the Magento cache.

How can I modify transactional mail?


texts:
im trying to add a thumbnail image to aw blog posts header and into the aw blog sidebar widget next to the each headline

i did these:

  In app/code/community/AW/Blog/Block/Manage/Blog/Edit/Form.php

change:

$form = new Varien_Data_Form(array(
    'id' => 'edit_form',
    'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
    'method' => 'post',
 ));

to

$form = new Varien_Data_Form(array(
    'id' => 'edit_form',
    'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
    'method' => 'post',
    'enctype' => 'multipart/form-data'
 ));

  In app/code/community/AW/Blog/Block/Manage/Blog/Edit/Tab/Form.php

add

$fieldset->addField('featured_image', 'image', array(
    'name' => 'featured_image',
    'label' => 'Featured Image'
));

below the line

$fieldset = $form->addFieldset('blog_form', array('legend' => Mage::helper('blog')->__('Post information')));

  In app/code/community/AW/Blog/controllers/Manage/BlogController.php

add

if(isset($_FILES['featured_image']['name']) and (file_exists($_FILES['featured_image']['tmp_name']))) {
   try {
      $uploader = new Varien_File_Uploader('featured_image');
      $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
      $uploader->setAllowRenameFiles(false);

      // setAllowRenameFiles(true) -> move your file in a folder the magento way
      // setAllowRenameFiles(true) -> move your file directly in the $path folder
      $uploader->setFilesDispersion(false);

      $path = Mage::getBaseDir('media') . DS ;

      $uploader->save($path, $_FILES['featured_image']['name']);

      $data['featured_image'] = $_FILES['featured_image']['name'];
   }catch(Exception $e) {

   }
}

// handle delete image
else {
   if(isset($data['featured_image']['delete']) && $data['featured_image']['delete'] == 1)
      $data['image_main'] = '';
   else
      unset($data['featured_image']);
}

below the line

$model = Mage::getModel('blog/post');

And added a "featured_image" column to the aw_blog table in database. Use the type VARCHAR(255) default null and null enable .

and add

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$post->getFeaturedImage() ?>

to

  /app/design/frontend/base/default/template/aw_blog/blog.phtml

below line

<?php foreach ($posts as $post): ?>

<a href="<?php echo $post->getAddress(); ?>" ><?php echo $post->getTitle(); ?>

but in blogs page image address is showing instead of image


texts: How to get total default quantity stock in stock and salable quantity stock in product In Magento 2?

texts:
I want to get 2 values.
1. How much total quantity assigns to the product? example(50)
2. How much is the total quantity remaining for that particular product?
Like if 50 quantity is there and if 5 quantity order so remaining or available quantity is 45.

Can anyone help me?


texts: Does anyone here use AWS for hosting Magento?

texts:
I am considering a migration over to AWS for my Magento instance since I have been told that it is the best solution for handling high traffic volume and huge catalog 100, 000+  products.

Could anyone recommend how to go about the migration over to AWS please?

I have found this link to their page but wanted to make sure that I am signing up for the correct service with the right configuration including Varnish cache beforehand...

I would really like a step by step guide to the process if its not too much trouble. Is it as simple as a regular migration from a shared host or dedicated server?

Any advice will be much appreciated!


texts:
This has been asked before, but I'm still not finding a solution. When using client side compile I get "NameError: variable @font-family-name__base is undefined". I've deleted everything and reinstalled M2 with composer. I'm working off of the blank theme with no custom code whatsoever. Permissions should be correct, I've deployed static content, grunt deploy, cleared caches numerous times and yet I keep getting "NameError: variable @font-family-name__base is undefined". I feel like M2 is very finicky, so I'm sure others have been in this same situation.

What are the cases and/or solutions that you guys have found?

Also, Luma works without any issues? This makes absolutely no sense to me...


texts: Magento 2. Custom Attribute And Plugin in Module

texts:
Good evening. I need to create Module which will add Custom Attribute for Customer and Plugin which will set this attribute to 1000 after registration, but during registration of a new Customer it displays error "We can't save the customer"
This is what I got:

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\Customer\Api\CustomerRepositoryInterface">
<plugin name="bonusPlugin" type="\Kt\Addbonus\BonusPlugin"/>
</type>
</config>

InstallData

<?php

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Model\Config;
use Magento\Eav\Setup\EavSetup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

const ATTRIBUTE_CODE = 'bonus_attribute';
/**
 * @var EavSetup
 */
private $eavSetup;
/**
 * @var Config
 */
private $config;

public function __construct(EavSetup $eavSetup,
                            Config $config)
{

    $this->eavSetup = $eavSetup;
    $this->config = $config;
}

/**
 * Installs data for a module
 *
 * @param ModuleDataSetupInterface $setup
 * @param ModuleContextInterface $context
 * @return void
 */
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{

    $setup->startSetup();

    $this->eavSetup->addAttribute(Customer::ENTITY, ATTRIBUTE_CODE, [
        'type' => 'int',
        'label' => 'Custom Attribute',
        'input' => 'number',
        'required' => false,
        'visible' => true,
        'user_defined' => true,
        'position' =>999,
        'system' => 0,
    ]);

    $attribute = $this->config->getAttribute(
        Customer::ENTITY,
        self::ATTRIBUTE_CODE
    );

    $attribute->setData('used_in_forms',['adminhtml']);

    $attribute->save();

    $setup->endSetup();

}
}

BonusPlugin

<?php

use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Customer\Api\Data\CustomerInterfaceFactory;

class BonusPlugin
{
  public function afterSave(CustomerInterfaceFactory $factory, CustomerInterface $customer){
    $customer->setCustomAttribute('bonus_attribute',1000);
 }
}

But when I try to create or register a new customer, it shows "We can't save the customer".


texts: Shopping Cart Rules slowing down Cart and Checkout Pages in Magento 1.6.x.x!

texts:
We have around 30-35 shopping cart rules created in our Magento store. These are making the cart and checkout pages too slow (~10-30 seconds). As soon as I remove all rules, the problem is resolved.

Anyway to get this fixed?

NOTE: I have tried using cache like Redis and APC already which are not working.


texts:
I'm trying to get the tax rate (just the value) for a product. I can get the Tax Class Id doing $product->getTaxClassId().

It seems incredible, but I can't find the way to get the value. Not the Price with the included tax or the tax amount but the percentage applied to the final price.

Can anyone help?

Thanks in advanced.


texts: Compilation gives fatal error/blank product page

texts:
I'm turning to turn on the compilation for a magento site and once I do the product and category pages give

[type] => 64
[message] => Cannot redeclare class Mage_Core_Model_Resource_Helper_Mysql4
[file] => /includes/src/__catalog.php
[line] => 12655

Nothing in the core file been changed and the only thing that been added is a module (Full Page Cache) which the developers are claiming isn't do with their plugin as they disabled it then tested it.

I'm using Magento ver. 1.7.0.2


texts: Magento 2: Knockout JS dependent dropdowns

texts:
How can I create a pair of dropdowns such that when one is selected, the options for the other one are updated?
The values for options for both dropdowns are coming from PHP.

I have absolutely no clue about knockout js. Any help would be appreciated.

Thanks


texts:
Our customers keep calling to tell us that they cannot checkout on our website. We currently have two payment gateways;

Sagepay
Paypal

When I have tried to checkout myself, this message has appeared in an alert box:

Payment has failed, please reload checkout page and try again. Your card has not been charged.

Does anyone know what may be causing this and how I can fix it?

Obviously I have tried reloading the checkout page. This does not fix the issue.

Thanks

edit: we are currently using Magento 1.9.2.4


texts: how to get product original price from order object

texts:
I've a Product with special price set to 8.00 with original price set to 12.00

I'm trying to retrieve product's (item's) original price from order object like this:

$order = (new Mage_Sales_Model_Order)->loadByIncrementId($orderId);
foreach($order->getAllItems() as $item) {
    $price = $item->getPrice();
}

but, all these public methods:

getPrice()
   getBasePrice()
   getPriceInclTax()

seem to only return special price, i.e. 8.00. How do I get original price, i.e. 12.00 ??


texts:
I'm trying to change something in Magento's automatic email.

The text of {{layout handle="sales_email_order_items" order=$order}}
 is this one :

Subtotal : xx €
Shipping & Handling : xx €
(...)

I wanna change the text label in this variable and in other of email template.
Unfortunetly, I can't find how to change label 'Subtotal' (or any other), do someone know how I can do it ?

Thank's a lot ;)


texts:
I have a Magento 1 site using paymentsense offsite payment.
When you go to the checkout you checkout as guest and enter all you normal details. Then when it comes to the payment info tab it asks for card details etc then you hit checkout and it takes you off to the paymentsense page where you have all the address stuff prefilled but it ask you for card detail again.
The issue is that this only happens for certain user's other users don't get the payment entry on the Magento site only on the paymentsense page.
Why are these two different issues scenarios happening randomly to different people.
It also does that if it happens to you that's it... no matter what browser or computer on the WiFi you see it - Almost IP relate.
Tried it on my phone on WiFi didn't see the double entry, tried again on 3g and it happens.
I have no other payment gateways setup.
Anyone else see this issue?


texts: Product Salable Quantity default 0(zero) when create new product in magento 2.3.1

texts:
In magento 2.3.1 when we create new product & set it's quantity 100; but automatically save Product Salable Quantity 0(zero) when we save this product.
Why Product Salable Quantity not set as per add product quantity.
Else why not change it from admin side.
Changes in database is not possible from site owner.
Any one help me for solve both points


texts: How to reload modules after modifying php files in Magento 2

texts:
I'm a newbie using magento 2, and i'm trying to modify a custom module (MercadoPago), i'm modifying the PHP file i need to modify but when I reload the page it doesn't seem to work.

I tried the same thing with a Hello world module, modifying its php files and the changes are still not made when i reload the page.

I tried using

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:flush

But doesn't work. How can i make my changes goes live on my site? I don't want to create a new module to replace the existing one neither want to change the version, i just want to modify some few lines of code.

I hope you can help me, thanks.


texts: Magento 2 getproduct collection with catalogsearch leftnav

texts:
I want get product collection with catalog search left block
I tried this way
$leftNavBlock = $layout->getBlock('catalogsearch.leftnav');
 $list['options'] = $leftNavBlock->getLayer()->getProductCollection()->getFacetedData($code);

but here not getting all options getting only some
brand having
tayota,hundai,honda,nissan,lexus. but by using above code tayota,hundai,honda,lexus.
in search result page it showing all options which assigned by products


texts:
I setup cronjob on server's crontab

*/5 * * * * /home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1

30 3 * * * php /home/users/mydomain/www/shell/indexer.php --reindex catalog_url

it seems working on server

[root@ /var/log]# grep '/home/users/mydomain/www/cron.php' cron

May 10 16:00:01 crond[21592]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:05:01 crond[21718]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)
May 10 16:10:01 crond[21766]: (root) CMD (/home/users/mydomain/www/cron.php >> /home/users/mydomain/www/var/log/cron.log 2>&1)

but when I check the cron scheduler module I can see that cronjob is not working

  Last heartbeat is older than one hour. Please check your settings and
  your configuration!

Both cronjob and scheduler works well before I moved my all files to other folders

How can I check Cronjob is working and make it work?


texts:
I've just installed Magento version 1.9.0.1, and now testing "checkout". I got the following error message. Please, someone help.

Step 1: Log as Customer -

http://www.studentfilmmakers.com/filmgear

Step 2: Select this product (or any product), and Click "Add to Cart"

http://www.studentfilmmakers.com/filmgear/index.php/magazines-c248/studentfilmmakers-magazine-digital-edition-march-2007-edition.html

Step 3: Fatal error message -

Fatal error: Class 'SoapClient' not found in /home/education/public_html/filmgear/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php on line 134


texts: Searchbox text and border colors not recognizing CSS changes

texts:
The home page´s searchbox  in our site doesn´t show properly even when the changes and modifications under the "System>Configuration>"OurTheme"options>Theme Design" Values are set to different colors. After refreshing the page, searchbox keeps the same appearance. I know it´s not recognizing the changes made, any ideas?

I leave a screenshot on how does the box looks like all the time, customers keep complaining it can´t be seen. Please HELP


texts: Magento 2.1.5: While adding Bundle items doesn't show all products for selection

texts:
I am trying to add items in bundle product but it does not shows all products.

  NOTE: Tried for both options  required Yes and  required No

Products count: 5130
Simple Products: 5129
Visibility(Catalog, Search): 5129
Status(Enabled): 5129

When trying to add options for bundle product, 4135 products showing.

What should I do to show all products there?


texts: Magento 2 Remove Estimate Shipping costs and Tax on cart page based on condition

texts:
I want to show/hide "Estimate Shipping costs and Tax" based on customer group.

I just do not write to css that hide block as it is bad practice. Is there any way we can disable component based on condition or remove block on xml based?

Thank you


texts: I am using the extenstion Fooman PDF Customiser. It works fine, but i want change some text in my invoice.


texts: Overriding Mage_Cms_Model_Resource_Page not working

texts:
I am trying to create my own module to override / extend Mage_Cms_Model_Resource_Page.

This is what I have so far

1) Enable the module by creating /app/etc/modules/Namespace_ModuleName.xml

<config>
    <modules>
        <Namespace_ModuleName>
            <active>true</active>
            <codePool>local</codePool>
        </Namespace_ModuleName>
    </modules>
</config>

2) Set up the config /app/code/local/Namespace/ModuleName/etc/config.xml

 <?xml version="1.0"?>
 <config>
  <global>
     <models>
        <page_resource>
            <rewrite>
              <page>Namespace_ModuleName_Model_Resource_Page</page>
            </rewrite>
        </page_resource>
    </models>
 </global>
</config>

3) Set up the new model - /app/code/local/Namespace/ModuleName/Model/Resource/Page.php

class Namespace_ModuleName_Model_Resource_Page extends Mage_Cms_Model_Resource_Page
{
    protected function _getLoadSelect($field, $value, $object)
    {
        echo 'test';
        exit;
    }
}

However when I load a cms page nothing happens but I can see whats wrong. Can anyone advise please


texts:
I want to get tracking details for an order:

http://www.magentocommerce.com/api/soap/sales/salesOrderShipment/sales_order_shipment.info.html

If I have an order object, how do I get the shipmentIncrementId? How do I query shipments, based on an order_id or a increment_id?


texts: Functionality of Add/Update, Replace, Delete clarity needed

texts:
What's the actual functionality difference during csv  import of

1) Add/Update

2) Replace

3) Delete- Delete just deletes the products imported in the csv during import

I am confused as for eg: If there are 10 products for importing, i make change for 5 products and select Add/Update, Will all the 5 ids or 10 ids be saved in backend or only those updated ones will be saved over existing ones.

If i select Replace, what exactly happens?

Clarity required!


texts: Customizing the insert widget type 'Catalog Products List' template

texts:
I'm adding the widget on a page by going
->Insert Widget ->Widget type-> Catalog Products List
After adding the widget, I can see the template path as 'template="product/widget/content/grid.phtml"'. I'm trying to update this template but working on a wrong file I guess. What is the full path for the template ?


texts: How to create new tab in product edit page by event observer in Magento 2

texts:
I want to add new tab in product edit page using controller_action_layout_render_before_adminhtml_catalog_product_edit event.
Can anyone help.


texts: Can I add captcha for SOME websites, not whole website?

texts: I'm developing a website which register customer is required to use official reCaptcha. But the client only want to implement reCaptcha on Website A, not Website B. The customer register form on Website B does not need to use reCaptcha. Is it possible to do so?


texts: add discount coupon code in newsletter subscription

texts: How to add a unique coupon code for newsletter subscriber. I am beginner in magento so please help how to send subscription email with this coupon code. please help.


texts: Magento2 developer mode doesnt generate static files on demand

texts:
I am running Magento 2 locally in developer mode

After installing i would not  expect to have to run php bin/magento setup:static-content:deploy if in developer mode.

However,  the only directory under static is _requirejs and all css and other assets generate a 404 on the frontend.

Is the php bin/magento setup:static-content:deploy command required even in developer mode or do i have an issue with this?


texts:
Can we use sql functions like MAX() MIN() for magento collection rather than the query mentioned in this post ?

How To Get Min & Max Attribute Values From Database to Link to Price Slider


texts: magento2 email header.html is not being included in transaction email

texts:
I have created a transactional email in Admin, Marketing -> Email Templates.

Loaded in an email template from the Default Templates, but it's a custom module.

The template code loaded into the text area is:

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

                     content and vars -- all working fine

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

The actual template file is:

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

Dear {{trans '%account_name' account_name=$customerName}},

                        We have updated the point balance for you so that you can have relevant information of points earned or spent. To view more details, please click here.

                            The transaction detail

                            Transaction title: {{var title}}

                            Transaction amount: {{var point_amount}}

                            Transaction status: {{var status}}

                            Current balance: {{var point_balance}}

If you have any other questions, please feel free to contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

Thanks again,

                            {{trans '%STORE' STORE=$store.getFrontendName()}}

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

And when I preview the template, the headers and footers show, however when the email is sent out, it's not showing the header or footer just the content.


texts: how to show po# in shipment_html notification email for shipment update variables?

texts:
there are many variables which we can use for email templates and Unfortunately I couldn't find purchase order and moreover this file is html so how can  I show the customer their purchase order number in notification email?
I know that it is a payment method and we have a variable for that but it showed nothing to me

the variable is {{var paymentMethod}}
I know that I should write my getpurchaseorder function inside order.php in mage/sales/order.php how ever I don't know how to write it to get the purchase method which is purchase order and then get the purchase order number


texts: Magento 1.9.3 does not send orders mail - corrupted database?

texts:
Can a database error cause not to send order mails?

I do not know when, magento stopped sending me emails when the customer orders. They do not come to me, not to the customer. Only mails with orders do not come. All other (shipping, etc.) are coming. Cron set correctly.

I installed a new magento installation with trial data. Without cron settings, test orders send emails. When I am modifying my products or changing the database, emails confirming the order do not send.

I'm fighting this for two months. I gave up. Magento v 1.9.3.0


texts: Migration from magento 1.9.2 to magento 2.3

texts:
can anyone please provide the process for migrating data, stores and configurations data.
i followed Magento 2 Migration Tool - Migrate Settings from 1.9 - 2.0 CE


texts: Why would Magento look in base skin folder instead of current skin folder?

texts:
In my local.xml I have added a new javascript load command. It is exactly the same as another javascript.

<action method="addItem">
    <type>skin_js</type
    <name>rateyo/jquery.rateyo.min.js</name>
</action>
<action method="addItem">
    <type>skin_js</type>
    <name>jquery.cbpContentSlider.js</name>
</action>

Yet I get a 404 in the browser because the link created for the second is in base, not in my theme.

<script type="text/javascript" src="https://.../skin/frontend/rwd/alpine2/rateyo/jquery.rateyo.min.js"></script>
<script type="text/javascript" src="https://.../skin/frontend/base/default/jquery.cbpContentSlider.js"></script>

WHY????????

I flush every cache, don't have compilation on, dont have merging, this is the dev site so no full page cache installed etc. etc. etc. Even though it sounds absurd I tried putting it in a subfolder, since that is one difference, but it has the same problem.

Why is one generated with correct skin reference and the other one not?

updating with a few more details

calling .../skin/frontend/rwd/alpine2/js/jquery.cbpContentSlider.js in the browser works, which shows that file is in the wrong place. But the URL Magento generates, which has the js removed, does not work.


texts: Moved from http to https but include www in url

texts:
Trying to setup my site so that its on HTTPS AND includes the WWW in the URL.

After a while of searching I found a few posts that helped me redirect to https:

stackoverflow.com/questions/25527671/magento-https-on-all-website-urls-redirect-to-homepage

and then to redirect to get the 'www' added in I used:

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I ended up with everything working eventually! BUT here is where I think a problem lies. It may be me being niggley BUT when you check a URL now on my site (old redirect URL):

http://aloe-herbal.co.uk/categories/Bee-Hive-Products/pages/Contact-Us.html

it redirects fine BUT then using a 301 redirect checker:

redirect-checker.org/index.php

 you can clearly see that there is 2 301 redirects happening here.. I don't think that's ideal..

Initially this was happening 2-3 3 times SO as an example if I used the URL to check as:
aloe-herbal.co.uk/fitness-weight-management.html
@ www.redirect-checker.org/index.php

 it would give me the following:

CONGRATULATION. Everything seems to be fine.

http://aloe-herbal.co.uk/fitness-weight-management.html
301 Moved Permanently
http://www.aloe-herbal.co.uk/fitness-weight-management.html
301 Moved Permanently
https://www.aloe-herbal.co.uk/fitness-weight-management.html
200 OK

I know it says its okay but I am concerned about the extra trip that its having to make..

So I decided top open a question. Well FIRSTLY thanks for a GREAT related questions feature. WOW gave me a fix straight away:

magento.stackexchange.com/questions/40400/magento-goes-first-the-http-then-redirects-to-https

Works like a charm now there is only 1 301 Moved Permanently listed :)

BUT again if you check: http://aloe-herbal.co.uk/categories/Bee-Hive-Products/pages/Contact-Us.html

you can see its there 2 times again... That's what I am trying to fix/avoid..

Can any experts help with this last part?


texts:
When the table with name sales_flat_order first introduced in Magento
& in which version ?
When the table with name log_visitor first introduced in Magento
& in which version ?


texts: how to solve this type of page to set IN magento 2?

texts: I have created theme and refresh homepage then this type of page is coming how to get complete homepage ? I did deploy and clean cache.


texts: Installing SUPEE 6285, error message still present in Admin area

texts:
I made sure to remove 5994 and the old 6285 patch as can be seen in the following:

user@domain.com [~/public_html]# sh PATCH_SUPEE-5994_CE_1.6.0.0_v1-2015-05-15-04-34-46.sh -R
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

user@domain.com [~/public_html]# sh PATCH_SUPEE-6285_CE_1.9.1.1_v1-2015-07-10-08-10-09.sh -R
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

user@domain.com [~/public_html]# sh PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh -R
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

I then installed SUPEE-5994 and 6285 version 2:

user@domain.com [~/public_html]# sh PATCH_SUPEE-5994_CE_1.6.0.0_v1-2015-05-15-04-34-46.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

user@domain.com [~/public_html]# sh PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

I then deleted the content of /var/cache, /var/session and /var/tmp, however when I log into the Magento admin panel I am still getting the following popup message:

July 7, 2015: New Magento Security Patch (SUPEE-6285) – Install Immediately

I had no errors during the patch installations and Google doesn't seem to have any information on this. Can someone please assist?


texts: Magento 2 - Cart rule not working automatically

texts:
we have Magento 2.1.16 ce

I have made a shopping cart rule like this:

Percent of product price discount
Priority 0

Conditions:
If ALL of these conditions are TRUE:
   If ANY of these conditions are 2:
      Collection is Autumn
      Collection is Winter

Actions:
Cart Items
Discount Amount 50.0000% of product
If ANY of these conditions are TRUE:
      Collection is Autumn
      Collection is Winter

When I add 2 items which match these conditions to the cart, it doe snot give the discount.
But when I click on update cart .... the discount will be applied.

Does anyone know why this is not being done automatically.

Because we want an other rule too.
With 3 or more items and than 60% discount.

But when I enable that rule, then 60% is also applied with 2 items in the cart ....


texts: Remove Static Block or Banner Widget through Custom Layout Update

texts:
All of the product category pages in our store are two column (nav left) format. One of our categories needs to have an element in the left hand column removed. Every single other page that has this left-hand column has this element in it, and needs to continue to do so, but for these few minor subcategories.

The previous developer had it set up so that the element was in a banner, and positioned with a widget via the CMS. It's set up to show up on a ton of different pages (eg: Categories is set to All), and we want to keep it like that so that we don't have to add new categories to a specific list as new ones are made by product managers and whatnot.

I couldn't find a way to remove banners nor widgets from a specific category, so I recreated the banner as a static block, intending to use the Custom Layout Update to remove it by its name.

<reference name="left">
<remove name="my_static_block_id"></remove>
</reference>

This does not work!

I also tried unsetChildren:

<action method="unsetChildren"/>

This removed everything from the left column (not desirable)

Is there some way to do this?  Perhaps somewhere I did not look? Thank you.


texts: Magento product import not displaying images in other stores

texts:
I've been struggling with this for the last couple of days and other links/suggestion I've seen have not helped. I've got 2 websites set up with one running off the main domain and the other works off a sub directory. Every thing works fine except when I try to import products, the images aren't showing on the other store and are replaced with a placeholder.

Has any one else come across this issue?

When add new products via the admin they work perfectly fine across both websites/stores so my configuration is correct, its just the import thats not working.

My import is here import.csv


texts: REST API: Consumer is not authorized to access %resources

texts:
I'm in the middle of finishing a Magento 2 store for a client. The last I had on my to-do list, was connect Magento to their accounting software through the REST API.
However, apparently there's some serious issue when it comes to the REST API in the Magento installation. No matter what I do I'm always given a "Consumer is not authorized to access %resources" error, such as:
{
    "message": "Consumer is not authorized to access %resources",
    "parameters": {
        "resources": "Magento_Sales::sales"
    }
}

POSTMAN Settings:
I'm using an Access Token created through Admin > System > Integrations. The created Integration has resource access set to ALL.
System:

CentOS 7
WHM/cPanel
PHP 7.3.27
PHP Handler SuPHP
Magento 2.4.1
Webserver: Apache (port 8080)
Cache: Varnish (port 80)
SSL: Nginx as reverse proxy for SSL (port 443)

Things I've tried based on similar questions:

Change PHP handler from CGI to SuPHP (source)
Enable individual API resource access instead of setting to 'ALL' (source)
Tested without Varnish between client and server
Tested without Nginx proxy between client and server

I really can't seem to figure out what I'm doing wrong here. Does anybody have an idea what might be causing this? An option would be to do a fresh installation, but that'd be my very last option as I've been working on this Magento environment (theme, thouuuusands of products, ...) for many months.

Edit 1: Been digging into this a bit more. Seems like the error is being caused in:
/vendor/magento/module-webapi/Model/Authorization/TokenUserContext.php
(Don't worry, I won't edit vendor files directly ;-))
Lines:
    $authorizationHeaderValue = $this->request->getHeader('Authorization');
    if (!$authorizationHeaderValue) {
        $this->isRequestProcessed = true;
        return;
    }

Looks like the Authorization header is missing. They are being set, so I guess something is causing them to be unset or not really being passed to the actual webserver?


texts:
I am working with Cart2cart to import a large catalog of products. We have so far done a demo migration of 2 configurable products and about 2k simply products that are associated with them.

Before going ahead with the full import I noticed that the site was slow to load initially. I did some tests and found that the ttfb was the longest portion and consistently 2 seconds or a little more than 2 seconds. the total time to load the page for the first time according to tests is between 8 and 12 seconds.

I changed the magento mode to production mode, and that seems to have taken about 0.7 seconds off the ttfb (it was about 2.7 seconds before).

This is a very vanilla install of magento 2.1.5. The only customization has been the product import.

I uploaded a test txt file to check if it was the server and it loads instantly and has no ttfb for all test websites so it is not the server I don't think (I have asked the host as well and they told me it is not the server and that I can check using this txt method).

Another thing, after loading the webpage/product page for the first time reloading it is very fast, but still is 2 seconds for the TTFB.

Before going ahead with more customization and the full product catalog import I wanted to see if there was anything I can do to bring down that TTFB? I imagine after the database is much larger and the website is using a theme, with more addons things will only get much worse.

What else can I do?


texts: Magento Limit number of products displayed in grid on homepage

texts:
I am using Magento 1.7.0.2 with shopper theme. I want to limit the number of products to 4 for each category displayed on the homepage. I have duplicated list.phtml and created three different list files for categories.

Code on homepage static CMS block is:

{{block type="catalog/product_list" category_id="116" template="catalog/product/featured_list.phtml" num_products="4" columnCount="4"}}
{{block type="catalog/product_list" category_id="104" template="catalog/product/jewellery_list.phtml" num_products="4" columnCount="4"}}
{{block type="catalog/product_list" category_id="117" template="catalog/product/bags_list.phtml" num_products="4" columnCount="4"}}

But this does not work. I am still getting 9 products instead of 4 for all the categories. 9 is the default number of products for grid view set in magento admin. If I change that 9 to 4, then the homepage shows 4 products each but this also changes the number of products shown for each category page which I do not want.

I have looked at many solutions offered but somehow there appears to be no talk about limiting number of products displayed in a custom list or grid.

Any help and guidance will be appreciated....


texts: How can i add an extra Fee compatible with PayPal?

texts:
I added a Module that adds an extra Fee (via Discount) when I order products for less than 50€. That module works for invoice payment.
When i want to pay via PayPal, I get an error like "there is a mistake"...

How can archive that? My idea was to create an observer that modifies the Paypal-Information... But how exactly i can make that?

I tried the following code:

public function paypalPrepareLineItems($observer)
    {
        /* @var $cart Mage_Paypal_Model_Cart */
        $cart = $observer->getEvent()->getPaypalCart();
        $address = $cart->getSalesEntity()->getIsVirtual() ?
            $cart->getSalesEntity()->getBillingAddress() : $cart->getSalesEntity()->getShippingAddress();
        $feeAmount = $address->getExtraFeeRuleAmount();
        $cart->updateTotal(Mage_Paypal_Model_Cart::TOTAL_DISCOUNT, $feeAmount);
    }

Thank you, Chris


texts: Magenoto2: how to get cart item quantity on front end

texts:
I am currently using this code and it is working fine,

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
$totalQuantity = $cart->getQuote()->getItemsQty();

but it is not working on few category pages as well as Home page in my theme.
Please help.


texts:
In Product we have Qty. Once we Order product & order is completed.

In sales_order_item table we have qty_backordered, qty_canceled, qty_invoiced, qty_ordered, qty_refunded, qty_shipped

Once order is completed majorly we need to check invoiced & shipped qty.

If i have X Product: It's original qty is 100, Ordered qty & shipped to 5. So total remaining qty is 95 out of 100.

How to get 100 using code? So we can get that out of 100 now 95 is remaining.

[UPDATE]

namespace Custom\Module\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\ObjectManager;

class OrderPlaceAfter implements ObserverInterface {

    /** @var \Magento\Framework\Logger\Monolog */
    protected $logger;
    protected $resources;
    protected $orderRepository;
    protected $stockItemRepository;

    public function __construct(\Psr\Log\LoggerInterface $logger, \Magento\Framework\App\ResourceConnection $resources, \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, \Magento\CatalogInventory\Model\Stock\StockItemRepository $stockItemRepository) {
        $this->logger = $logger;
        $this->resources = $resources;
        $this->orderRepository = $orderRepository;
        $this->stockItemRepository = $stockItemRepository;
    }

    public function execute(Observer $observer) {

        $orderId = 110; // My Order Number

        $order = $this->orderRepository->get($orderId);

        if ($order->getEntityId()) {
            $items = $order->getItems();
            foreach ($items as $item) {
                $stock = $this->stockItemRepository->get($item->getProductId());
                echo $stock->getQty().'-'.$item->getQtyShipped();
                //echo $remainingShipQty = $stock->getQty() - $item->getQtyShipped();
            }
        }
          exit;

      return $this;
    }
}


texts: Magento product check if price is below 30

texts:
I want to add a php line to my /product/view.phtml file.

I want to check if the price of the product is below 30.

How can I achieve that?

I tried this, but that does not work:

<?php if(inval($_product->getFinalPrice()) < 30): ?>

test

<?php else: ?>

test 2

<?php endif; ?>


texts: Programmatically update attribute option values for each Store View

texts:
I have  an attribute with the input type Dropdown named "Example Attribute" and two Store Views.

This attribute has a few options, but only the Admin values are set:

How can I programmically modify the values for each Store View? For example let's say I'd like to add the name of the Store View to each value:

I have found some very complicated answers which basically propose to completely overwrite all the values, but none did exactly what I need. I have tried various snippets of code that I found but none have worked for me. I've also looked through Magento's core classes but I was unable to find anything related to my problem.


texts:
Recently I have a task I need to add a column in sales order grid and that column will show tax percent of order.Tax are applying according to the postcode of address,I tried below code

$order = Mage::getModel('sales/order')->load(100001045,'increment_id');nt();
echo "<pre>"; print_r( $order->getFullTaxInfo());

But getFullTaxInfo() method sometimes not giving anything.

Can anybody let me know how I will get the tax percent of the order by order id?


texts:
recently I noticed that there is a file name "error_log" in the home directory of my magento system (around 6.5gb). Any idea what is the purpose of the file and any ways to shrink it? As it's eating up my server space.

Note: I don't think this is the log size in my database, since it is a separate file sitting in the home directory. Thanks!


texts: How do you add a custom attribute to the customer grid in the adminhtml?

texts:
Seriously why is this such an exercise in frustration?

I've added my custom customer attribute using the EAV model, the PROPER way.  I'm able to save this attribute when I save a customer.

I've added MyModule\view\adminhtml\ui_component\customer_listing.xml with the following code

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">
        <column name="constit_id">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="editor" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Constit ID</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Problem is, I don't think I'm getting data for the constit_id column. I've looked at how the customer core module generates this data, and of course, none of any non-core attributes are included when ->getData() is called.


texts:
I have a custom frontend form. The form is submitted via ajax. The form has a "type=file" field. I want to save the uploaded file to a folder.How can I do that. Please help..

How is it possible to get the uploaded file in ajax sumbitted form

This is my "type=file" field in phtml.

    <?php echo $this->__('Select File(s)');?>

Upload any files that are necessary for your order by clicking on the Add File(s) button below.

    <input type="file" class="file" id="attachment" name="attachement" style="display: none;" onchange="fileSelected(this)" value=""/>
    <input type="button" class="button" id="btnAttachment" onclick="openAttachment()" value="Add File(s)"/>

This is my button field in phtml.(button action is file upload)

    <input type="button" class="button" id="btnUpload" onclick="callAjax()" value="Upload File(s)"/>

This is my script

function callAjax(){
    var filename = document.getElementById("filename").innerHTML;//alert(test);
    var companyname = document.getElementById("company").value;
    var name = document.getElementById("f_name").value+" "+document.getElementById("l_name").value;
    var phnumber = document.getElementById("phnmbr").value;
    var email = document.getElementById("email").value;
    var file = document.getElementById("select-file-det").innerHTML;
     jQuery.ajax({
        type    : "POST",
        url     : "<?php echo Mage::getUrl('module/index/action'); ?>",
        data    : ({company: companyname,name: name,phnumber: phnumber,email:email,file: file,filename:filename }),
        dataType: "json",
        complete: function(response) {
           document.getElementById("success-msg").style.display = "block";
           document.getElementById("select-file-form").style.display = "none";
           //setTimeout(function() { window.location=window.location;},3000);
        },
    });
}


texts:
How can we identify  whether the class is injectable or not in Magento 2 as per the comment.
In this answer get is used by object manager, can any one tell me how to convert below class into constructor as a dependency class.
How can we treat get and create into constructor as a dependency classes.

$stockItemFactory = $this->objectManager->get('Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory');
$stockItem = $stockItemFactory->create();


texts: How to integrate Magento into Wordpress?

texts:
I want to integrate Magento to a wordpress site. I tried with this plugin. http://wordpress.org/plugins/magento-wordpress-integration/ But after installation nothing changed.

Any suggestions will be appreciated.

Thanks in advance.


texts: Magento 1.9 Shipping Method is not visible on checkout page

texts: I am having an online ecommerce store. I had used flat rate for all the products with same delivery charges. When I add the product on my cart, then my cart only shows main price of the product but not showing the Delivery charges. I had cleared all the caches & fixed indexes, but still facing this issue. Sort Order is "1". I had attached an screenshot of frontend & backend for better understanding. Any help will be appreciated.


texts:
I can't seem to find anywhere that says Virtual products in Magento cannot be taxed.

There is a weird occurence that I have discovered.

If I have ONLY virtual items in my shopping cart with a Product Tax Class assigned to them, no tax is displayed or calculated after entering a taxable zip code.
If I have at least ONE non-virtual item (simple for example), then tax is calculated for ALL of the virtual items, and the simple.

Is this a bug, or am I missing something?


texts:
On our category management page we have a dropdown field for Meta Robots.  I'm not sure if this is coming from a module or not, but it's currently empty.  I'd expect it to contain options for nofollow etc.  How can I populate this?  Is anybody familiar with it?

Thanks


texts: We have more than 40,000 products with attributes.When i tried to export from backend it throws an error 502 gateway error.Can you please suggest me one solution


texts:
I am creating a module for check distance from store to various area. For this, I need to give sample csv file format to store managers so they can format their csv files and upload in admin-side.

I need to put that link besides file-browse button.

For that, I have created below code.

$fieldset->addField(
        'csv_file',
        'file',
        [
            'name'  => 'csv_file',
            'label' => __('Upload Csv File'),
            'title' => __('Upload Csv File'),
            'note' => '
<span id="sample-file-span"
                                    . ''
                                    . __('Download Sample File')
                                    . '',
        ]
    );

By this, I can see the link.

My questions are,

Where I put my sample csv file in my module ?

What to write code in href attribute so store-manager can download it ?

Advanced Thanks !


texts:
I just truncated sales_shipment_grid, but want to know that how can regenerate it.
Means that have all data on sales_shipment yet but there is nothing on sales_shipment_grid and this table is empty. Actually, I want to regenerate it.

PS: I tried setup:upgrade, di:compile, static-content:deploy, reindex, flush cache too.


texts: Can the Magento swagger UI also show XML sample data and allow XML requests?

texts:
We are using the swagger UI at ourshop.example.com/swagger to the the API and generate examples.

While the Magento API perfectly supports XML data (incoming and as result), the swagger UI only allows application/json format.

Is there way to tune the integrated swagger UI to also support XML?


texts: Brexit 2021 : UK Small Parcel VAT tax and Magento 2 , how to implement

texts:
After struggling through a chaotic year, and keeping only small track of the comedy of horrors that is Brexit we find ourselves at the end of 2020 and its back.
As a small EU (Dutch) B2C website with some sales to the UK our Brexit preparation so far has been:

At the end of 2020 set all taxes for the UK to 0% (outside EU), start writing CN23's as for any other outside EU country (including Norway/Switserland)

However, more information has been propping up about the small parcel tax that comes into force on January 1.
Detailed in #1 we need to the following:

Set all taxes to 0% for outside EU
Register for a British Tax VAT account
For orders under GBP 135 #2, collect a 20% VAT at point of sale (eg. our website)
Report the VAT to British tax office

Step #1 is trivial. However, Step 3 seems more than just a little complicated.
Are there any Magento 2 modules that can assist in this ?
Additional
#1 https://zonos.com/blog/2020/11/05/uk-vat-changes-after-brexit-what-does-it-mean-for-my-business/
#2 Ignoring the whole GBP 135 at what/whose exchange rate question for now
#3 Additional for those not up to speed on the Brexit/Small parcel tax:
https://youtu.be/saKw6j836hw?t=883


texts: Custom price passed through module when add to cart but not when "edit" item function

texts:
I have a simple module that obtains a custom price for an item when added to cart. The code for the module is below. My issue is that the custom price is not passed to cart when the "edit" function is used in cart. For example: as a user, I navigate to my shopping cart that has a few items and I click "edit" next to one of those items. I am redirected to the item page so that I can change options and/or quantity. I select "add to cart" and the custom price is not passed to the cart. It works fine under a normal add to cart situation, but not with "edit". Any changes I can make to the module to make the custom price pass to the module with the "edit" function? Add another event to config perhaps?

config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Caitlinhavener_Dynamicprice>
            <version>0.1.0</version>
        </Caitlinhavener_Dynamicprice>
    </modules>
    <global>
        <models>
            <chdispatcher>
                <class>Caitlinhavener_Dynamicprice_Model</class>
            </chdispatcher>
        </models>

            <events>
                <checkout_cart_product_add_after>
                    <observers>
                        <modify_to_custom_price>
                            <class>Caitlinhavener_Dynamicprice_Model_Observer</class>
                            <method>modifyPrice</method>
                        </modify_to_custom_price>
                    </observers>
                </checkout_cart_product_add_after>
            </events>
    </global>
</config>

Observer.php:

<?php
class Caitlinhavener_Dynamicprice_Model_Observer
{
    public function modifyPrice(Varien_Event_Observer $obs)
    {
        // Get the quote item
        $item = $obs->getQuoteItem();

        // Ensure we have the parent item, if it has one
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );

        // Load the custom price
        $price=$_POST['customPrice'] or exit ("This price variable post doesn't work");

        // Set the custom price
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        // Enable super mode on the product.
        $item->getProduct()->setIsSuperMode(true);
    }
}
?>


texts:
Hey I am a noob to Magento 2.I am trying to work on a module where I am passing a class as backendModel for a config field in system.xml, but I am getting an error as :

  Critical:Invalid Config field backend model:"Classpath"

Can someone tell me how to use backend_model class in Magento 2.0 and what class it should extend in order to avoid above error?


texts: How to Login as Customer from Admin Dashboard without Customer Password?

texts: I am a newbie at Magento 2 and I would like to ask how to log in as the customer on admin side.?


texts: How to send emails to multiple users in magento2?

texts:
I am trying to send email to single user means it's working fine.How can i send to multiple user?

$transport = $this->transportBuilder
           ->setTemplateIdentifier('my_email_template')
           ->setTemplateOptions(
                [
                    'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
                    'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
                ]
            )
           ->setTemplateVars($vars)
           ->setFrom($sender)
           ->addTo($toEmail)
           ->getTransport();
        $transport->sendMessage();
        $this->inlineTranslation->resume();


texts:
Is it possible in M2 to change mobile menu item order?

I tried looking and couldn't find. I wanna put settings in the back and put menu item in the front using xml.
Basically tried this line
<move element="store.links" destination="navigation.sections" after="store.settings" />
and it won't work.


texts: How to Hide Field from Order Create From Back-end Magento 2

texts: I have to Hide Some of the Fields from shipping and Billing Adress how I can achieve this need guidance thank you


texts: How to configure xampp to send mail from localhost in Mac

texts:
I register an account in magento 2 but it seems I can't use the credential to login as per there is no password upon creating. There is a link to forgot password but the email sending is not working in my localhost.

I follow this but it seems this is for windows:
https://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost

Anyone can help me configure the send mail from localhost, I'm using xampp in Mac

Thanks


texts:
My custom module uses an Admin Grid to display my model. I have added a link to my edit method with a button as follows:

$this->addColumn('action',
    array(
        'header' => 'Action',
        'width' => '50px',
        'type' => 'action',
        'getter' => 'getId',
        'actions' => array(
            array(
                'caption' => 'Edit',
                'url' => array(
                'base'=>'*/*/edit'
            ),
            'field' => 'store_id'
        )
    ),
    'filter' => false,
    'sortable' => false,
)
);

Nine times out of 10 this works correctly and loads my Edit form with pre-filled data. However one on 10 clicks will load an empty form. This is because the link on the edit button is using id instead of store_id.

I’ve tried playing around with the ID’s on the addColumn() method about but it seems futile this the error is erratic. Even when a link is incorrectly constructed for a row, the other rows will be correct. Further it’s not the same row(s) that experience this behavior.

Really not sure hat else to try.

Bob.


texts:
Magento 2.3.0 has bug - can’t upload watermark pictures in admin panel.
I do next:

vendor/magento/module-catalog/view/adminhtml/ui_component/design_config_form.xml

On approx lines 21, 81 and 140 each line, change fileUploader to imageUploader.

vendor/magento/module-swatches/view/adminhtml/ui_component/design_config_form.xml

On approx line 16 change fileUploader to imageUploader.

Now I can upload watermark, but pictures of product with watermark I see in small pictures only! There are no watermarks in Base, Thumbnail and Swatch pictures of poduct.
How to fix this bug and set watermark to all product pictures?


texts: Magento 2 Category page showing 504 Gateway Timeout Error

texts:
My store is working fine which is developed in Magento 2 but when I am trying to access any category pages then I am getting 504 GATEWAY TIMEOUT.

I am using NGINX webserver.

This issue is only for category pages as other pages are working fine.

Any help will be highly appreciated.


texts: Import default value in import product price

texts:
I have multistore in magento 1.9 site. Like au,us and ca I use following csv to import prices.

No | store |    sku  |  price

au => MYSKU 20
us => MYSKU 30
ca => MYSJU 31

But this will set stores vice prices.

so how can we set default price?


texts: B2B using Customer Groups as Company Account or creating another table for Company Accounts

texts:
We are building a Magento site for a B2B application.  At first our developer used Customer Groups to function as Company Accounts, so that Customers (contacts) could be linked to each of them.  However, we are at 600 Customer Groups and over 55,000 products and reindexing will not complete.

Our web host tells us we are not using Magento how it should be used.  They recommend we reduce the number of Customer Groups (to 2-3) to resolve the reindexing problem.  However if we do this, we still need to account for Company Accounts somewhere in the database.  So my developer says they can create another table for Company Accounts which will have to be manually linked to pricing etc.  However, I'm unsure if this is going to solve the reindexing problem.

How can we be sure before going to the additional trouble/expense that it will work?


texts: How to include flat shipping rate in shopping cart

texts:
My magento site uses table rates to determine the shipping price. My current version of Magento (CE 1.7.0.2) only shows the shipping price to the customer at the later stages of checkout.
How can I have the shipping displayed earlier in the shopping cart calculations (per item and then added to the total)?


texts: Get/Add VAT number in checkout/address customer List

texts:
I need set/get VAt  number in shipping/billing address, and when the user checkout the order, but magento api don't have this value.
how can i get it from php or Magento api?.


texts: how to get current products custom attribute value in block(phtml) to display in products details page magento2?

texts:
Here i am trying to get current products custom attribute value in
  block(phtml) and after that i want to show these custom attributes
  values in products details page using block,phtml file magento2.


texts:
I have 13mb file I want to upload, I've increased the php.ini file to 100MB but Magento upload page still giving me the warning to make sure the file is less than 8MB.
is it possible to upload the CSV product file more than 8MB?


texts: How to add Extra Fee Label Value in cart Page Cart Summary After Subtotal Section?

texts:
I already created a module for that extra fee amount display in Check Summary
but I also want to Display in cart Page Summary Section

Here I attach the screenshot of check out page summary extra fee

Here I attach the cart page summary that custom tax I also want to display here


texts: Product Image upload issue: File size should be more than 0 bytes

texts:
While using Firefox, when I try to upload an image through the product image uploader I am getting an error saying "File size should be more than 0 bytes". this error doesn't occur in Chrome.

this is what it looks like:

anyone got an idea what could cause this behavior?

I know this uploader is flash based so I tried already to disable/enable/reinstall my Firefox flash plugin but it didn't help.


texts: Disable Category Page Description Content from showing on Filtered Results

texts:
In our category pages the description attribute shows at the top of the page. This section is really helpful for the initial category experience.

Problem:

When the user filters down the category, the description still displays. At that point.. the description isn't so helpful, is redundant and takes up valuable above the food space.

Question:

How can we limit the description from only showing on the non-filtered version of the category page?


texts: Keep select box dropdown for configurable swatches

texts:
Magento 1.9.1, using the rwd theme.

Is it possible to set an attribute as a configurable swatch but leave the control in the product page as a dropdown?

I can see that the JavaScript is using swatches to control the dropdown which has been given the class no-display

Removing this class and operating the select box in the browser shows this to be the case.

Ideally I really just want the 'different product image per option' part of the configurable swatches, but Magento doesn't seem to offer the ability to do one without the other.

Can configurable swatches be made to use the original dropdown?


texts: how to add another field to category edit page in backend?

texts:
In version 2.0.x I was able to add another tab to the category edit page in the backend. But since Magento2 moved to UI Components with version 2.1.x  it's broken.
I can't get my head around it actually that's why i'm asking here.

Do I have to extend Magento\Catalog\Model\Category\DataProvider?
Or is there a smarter way?

I want to add another field to the category edit page where I can access the current category product collection.

Can anyone help me out?


texts: custom variable via custom category > design

texts:
Is there any way to set custom variable name with value in catalog > category > custom deign

Basically what i want a user is on category A he will get option to buy product from cat b and get offer

so basically i want to show url of category b when user browses category A.

any easy way to do this .


texts: can't create configurable product programatically

texts:
im create configurable product programatically. all works fine but attribute is not set to configurable product when i open product in admin is look like

see image.

how i can set attribute to configurable product..

i used this code to set attribute

$superAttributeIds = array('92');
$cProduct = Mage::getModel('catalog/product')->load(1261);
$cProduct->getTypeInstance()->setUsedProductAttributeIds($superAttributeIds);

$cProduct->setCanSaveConfigurableAttributes(true);
try
{
        $cProduct->save();
}
catch( Exception $e)
{
        echo $e->getMessage();
}


texts: How to create the order programatically in magento2

texts:
How to create the order programmatically in magento2 using objectManager. I need to test the order creating or not in the root folder.
Can you please anyone help me.


texts: How to include Toolbar in home page with Magento_CatalogWidget

texts:
I have created a CMS page in Magento 2.4.1 back end, and added the following widget:
{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" title="Featured Products" show_pager="1" products_count="8" template="Magento_CatalogWidget::product/widget/content/grid.phtml" conditions_encoded="^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`category_ids`,`operator`:`==`,`value`:`8712`^]^]"}}


texts: Magento 2 Docker: Frontend ignore updated files

texts:
i'm losing my mind and work.
This is not my first Docker expierience, I worked with magento-docker in the past.
Today I have this strange problem that cannot resolve by myself and seem no other had.
When I save a file  on vendor or app/design folder Magento completely ignore the update.
I am sure that this files in the container (bin/magento-docker bash) are up to date immediately on save. It seems like the web server don't take this files.
bin/magento cache:clean/flush do not resolve, I had to stop and restart docker
The containers are create with ece-tools build:compose with --no-varnish option


texts: Magento 2.3.x Product Description showing at short below image place

texts:
so how i can move the product description  container to below image place?.

so i need modify the file catalog_category_view.xml and another file?