texts: how to access custom option of item before placing it into cart

texts:
I have created observer for sales_quote_add_item  event, i am using udropship_vendor module for vendor management. So price of a product  is attached to product in custom options.  I couldn't able to fetch  udmp_vendor_data  custom option please suggest.

$item = $observer->getQuoteItem();
echo '<pre>';  print_r( $item);  exit;

Is giving (part of an output)

[udmp_vendor_data] => Mage_Sales_Model_Quote_Item_Option Object
(
[_item:protected] => Mage_Sales_Model_Quote_Item Object
     *RECURSION*[_product:protected] => Azri_Unsetdeleverydate_Model_Catalog_Product Object
     *RECURSION*[_eventPrefix:protected] => core_abstract [_eventObject:protected] => object[_resourceName:protected] =>sales/quote_item_option
     [_resource:protected] => [_resourceCollectionName:protected] => sales/quote_item_option_collection
     [_cacheTag:protected] => [_dataSaveAllowed:protected] => 1
                              [_isObjectNew:protected] =>
                              [_data:protected] => Array
                                (
                                    [option_id] => 195991
                                    [item_id] => 25349
                                    [product_id] => 5566
                                    [code] => udmp_vendor_data
                                    [value] => a:25:{s:17:"vendor_product_id";s:6:"245116";s:9:"vendor_id";s:4:"3748";s:10:"product_id";s:4:"5566";s:8:"priority";s:4:"9999";s:12:"carrier_code";N;s:10:"vendor_sku";s:11:"87859_200-2";s:11:"vendor_cost";N;s:9:"stock_qty";N;s:10:"backorders";s:1:"0";s:14:"shipping_price";N;s:6:"status";s:1:"1";s:12:"reserved_qty";N;s:11:"avail_state";N;s:10:"avail_date";N;s:12:"vendor_title";N;s:12:"vendor_price";s:7:"27.0000";s:5:"state";s:3:"new";s:13:"special_price";N;s:17:"special_from_date";N;s:15:"special_to_date";N;s:11:"state_descr";N;s:12:"freeshipping";s:1:"0";s:16:"udropship_vendor";s:4:"3748";s:5:"label";s:9:"Lieferant";s:5:"value";s:15:"Propagroup GmbH";}
                                )
                               [_hasDataChanges:protected] => 1
                               [_origData:protected] => Array
                                  (
                                     [option_id] => 195991
                                     [item_id] => 25349
                                     [product_id] => 5566
                                     [code] => udmp_vendor_data
                                     [value] => a:25:{s:17:"vendor_product_id";s:6:"245116";s:9:"vendor_id";s:4:"3748";s:10:"product_id";s:4:"5566";s:8:"priority";s:4:"9999";s:12:"carrier_code";N;s:10:"vendor_sku";s:11:"87859_200-2";s:11:"vendor_cost";N;s:9:"stock_qty";N;s:10:"backorders";s:1:"0";s:14:"shipping_price";N;s:6:"status";s:1:"1";s:12:"reserved_qty";N;s:11:"avail_state";N;s:10:"avail_date";N;s:12:"vendor_title";N;s:12:"vendor_price";s:7:"27.0000";s:5:"state";s:3:"new";s:13:"special_price";N;s:17:"special_from_date";N;s:15:"special_to_date";N;s:11:"state_descr";N;s:12:"freeshipping";s:1:"0";s:16:"udropship_vendor";s:4:"3748";s:5:"label";s:9:"Lieferant";s:5:"value";s:15:"Propagroup GmbH";}
                                   )
                                [_idFieldName:protected] => option_id
                                [_isDeleted:protected] =>
                                [_oldFieldsMap:protected] => Array()
                                [_syncFieldsMap:protected] => Array()
                                )
                                )

I have tried    $item->getOption() and  $item->getOptionbycode('udmp_vendor_data') in   by using both or not working. Please suggest.


texts: How we can check QA Review issues on Magento Marketplace?

texts:
I have upload extension on Magento marketplace and its Rejected from QA Review. As we can check only Technical Report where showing No verification errors. Can you guys please suggest how we can get the QA Issues so I can fix and re-upload from the review.

Thanks


texts: Product stock is not saved when creating a product programmatically

texts:
I'm creating products programatically on Magento CE 1.8.1. The form works fine except every once in a while we get a nasty error that comes and goes away, and does not affect all users.

:"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '970-1'
for key 'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID'"

Like I said, it doesn't always show up. I found many questions about this problem and saw as many suggestions to use

$product->getResource()->save($product);
// instead of
// $product->save();

I tried that and I think the error does stop showing up, but a new problem arises; stock isn't saved properly. The code that I was using was:

// this works with $newProduct->save()
// but it doesn't work with $product->getResource()->save($newProduct)

$newProduct->setStockData(array(
              'qty'=>$params["qty"],
              'is_in_stock'=>1, 'notify_stock_qty'=>$params["stockqty"]));

I then tried using this:

$newProduct = Mage::getModel('catalog/product')->load($product_id);
$stockItem = Mage::getModel('cataloginventory/stock_item');
$stockItem->assignProduct($newProduct);
$stockItem->setData('manage_stock', 1);
$stockItem->setData('is_in_stock', 1);
$stockItem->setData('use_config_notify_stock_qty', 0);
$stockItem->setData('qty', 40);
$newProduct->setStockItem($stockItem);
//save product..

But nothing. Stock is always 0, and manage_stock is always set to No. So I tried loading and saving the stock item after saving the product but I got a new error: "SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bitnami_magento`.`cataloginventory_stock_item`, CONSTRAINT `FK_CATINV_STOCK_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON D)" which sounds like the product hasn't been created yet! I checked the backend and the product was created, but with no stock. It seems like the resource save method ignores the stockData and also the stockItem.

I'm running out of ideas here. I've read a bunch of questions here where these worked but they're not working for me. Has anyone run into this before?


texts: Magento 2 Change Minicart Product Image from thumbnail to regular image

texts:
After editing the minicart for a couple of days now i've noticed that the images are smaller versions of the images that you would see on the product pages. This means as i'm upscaling them to fit a larger container they are losing quality.

The file containing the image reference is within Magento_Catalog/web/template/product/image_with_borders.html although the image src is set like so:

data-bind="attr: {src: src, alt: alt}

I don't really know how I would go about changing the image src but I imagine there is another file somewhere where this references to but I can't find it. Any help appreciated.


texts: What do you do when xml layout isn't enough to position something where you want

texts:
According to this article a good theme should have "no .phtml template files, except for those that were modified to support the new theme. (Usually this number will be very small.)"

So in an ideal world we could accomplish anything we need by modifying only CSS and the local.xml for a theme.

In the real world though, every client ends up requesting something that I end up having to modify the phtml templates to achieve.

For example, a client is working with a 3rd party company that has asked me to put a div in a very specific spot:

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

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

        {{ The new HTML needs to go here, but there is no getChildHtml call }}

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

I see only two options:

add a call to $this->getChildHtml('my_block') (This requires modifying 1column.phtml, 2columns-left.phtml, 2columns-right.phtml and 3columns.phtml)
add the block as a child of header, then use javascript to append/prepend it to the desired parent div location (This just seems like a hack to me; could cause FOUC)

I ended up going with the first option, but this is not upgrade proof. When/if those templates are changed in a future release, I'll have to manually merge the changes, so this is not an ideal solution to me.

What would you do in this situation?


texts: Composer Vendor Directory : Accessing magento classes from Vendor directory

texts:
I have installed a magento module called Mage-Resque using composer. Composer has installed all the components into a directory called Vendor. When I run the module, one of the component needs to access the class Mns_Resque_Model_Job_Logmessage. But it always returns error Class not found.

As per my understanding the codes in Vendor directory cannot access the Namespace of Magento. How can I solve this issue should I something additional config in composor.json file.

EDIT

Here is the error message that I get

Could not find job class Mns_Resque_Model_Job_Logmessage
backtrace : vendor/chrisboulton/php-resque/lib/Resque/Job.php(172): Resque_Job_Factory->create('Mns_Resque_Mode...', Array, 'default')\",\"#1 //vendor/chrisboulton/php-resque/lib/Resque/Job.php(189): Resque_Job->getInstance()\",\"#2 //vendor/chrisboulton/php-resque/lib/Resque/Worker.php(240): Resque_Job->perform()\",\"#3 //vendor/chrisboulton/php-resque/lib/Resque/Worker.php(202): Resque_Worker->perform(Object(Resque_Job))\",\"#4 //vendor/chrisboulton/php-resque/bin/resque(127): Resque_Worker->work(5, false)

EDIT

When I searched I found that the check ie the check for to whether class exists happens in following path vendor/chrisboulton/php-resque/lib/Resque/Job/Factory.php. But the model class is in app/code/community/Mns/Resque/Model/Job/Logmessage.php.

Composer.json

{

    "require": {
        "ajbonner/mage-resque": "*",
        "magento-hackathon/magento-composer-installer": "*"
    },
    "require-dev": {
        "aoepeople/aoe_profiler": "*",
        "magetest/magento-phpunit-extension": "*"
    },
    "repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/magento-hackathon/magento-composer-installer"
    },
    {
        "type": "vcs",
        "url": "https://github.com/ajbonner/magento-composer-autoload"
    },
    {
        "type": "vcs",
        "url": "https://github.com/ajbonner/mage-resque"
    },
    {
        "type": "vcs",
        "url": "https://github.com/MageTest/Mage-Test"
    },
    {
        "type": "vcs",
        "url": "https://github.com/fbrnc/Aoe_Profiler"
    }
    ],
    "extra":{
        "magento-root-dir": "./",
        "magento-deploystrategy":"copy"
    },
    "config": {
        "bin-dir": "shell"
    }
    "minimum-stability": "dev"
}

To test I have created a controller action from which I'm queuing a job. The job seems to be getting queued in Redis server but then it results in above error.

Here is the code in controller action I'm using (Please note that this is code I copied from GitHub page for Mage Resque)

$resque = Mage::getSingleton('mnsresque/factory')->create();
$resque->addJob(
    'Mns_Resque_Model_Job_Logmessage',
    array('message'=>'foo'));

As per the error log the error occurs in the following file

vendor/chrisboulton/php-resque/lib/Resque/Job/Factory.php:16

Which is outside of the Magento app/ folder structure. And following is the code that causes this error.

if (!class_exists($className)) {
            throw new Resque_Exception(
                'Could not find job class ' . $className . '.'
            );
        }

The class above code trying to access is defined in app/code/local/community/Mns/Resque/Model/Job/. I have also tried copying the entire folder Mns to /chrisboulton/php-resque/lib/Resque/Job/ thinking that the class_exists checks in the current folder. But that too is not working.

How I can resolve this issue. Have i missed something?


texts: Magento 2 : how to include custom image in email template?

texts:
I have made some email templates, i am not much sure where i can add image files & use it in email templates ?
Is their is possible way to get it ?
Please let me know your thoughts on this.
Thankyou


texts: Layered navigation, going to other page doesnt work

texts:
I've done an upgrade on a Magento webshop and on the upgraded theme (Joomlart) I've got a problem with the layered navigation in combination with pagination. Was working before I did and upgrade. (Magento theme upgraded from 1.4.3.2 to 1.7)

I've recreated the problem with the theme template;

http://1d963b0e2ceac64a.builder.joomlart.com/pcgames/classic.html

(Updated site is still on staging server.)

Using the grid view, 9 articles.

The category has 41 products.

When I use shop by -> price ($0.00 - $999.99) (39 products) this generates the following slug: "/category/slug.html?price=-1000"

All good so far.

But if I want to see the following nine items priced ($0.00 - $999.99) and click page number 2 It gives this url; "/category/slug.html?p=2"

How can I make it so that the link will turn out like this; "/category/slug.html?price=-1000&p=2" ?

Would like to share some code but not quite sure which file I should touch?


texts: Write custom attribute on final_price.phtml

texts:
I would like to get a custom attribute "bum" (base unit of measure) on the page "final_price.phtml".
Do you know if it's possible to add a custom attribute after the price to something like this:

before : $ 2.35
after : $ 2.35 per RL

final_price.phtml:

Thank you for your help


texts:
I'm trying to install a couple of modules through composer on Magento 2.4 using the default composer.json, however it fails. I'm using composer version 1.10.21. According to the official documentation I should use the following line:
composer require myparcelnl/magento

Output:
Using version ^4.1 for myparcelnl/magento
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/product-community-edition could not be found                                                                              in any version, there may be a typo in the package name.
  Problem 2
    - myparcelnl/magento 4.1.4 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.3 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.2 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.1 requires magento/product-community-edition ~2.3.0                                                                              -> no matching package found.
    - myparcelnl/magento 4.1.0 requires magento/product-community-edition ~2.3.0                                                                              -> no matching package found.
    - Installation request for myparcelnl/magento ^4.1 -> satisfiable by myparce                                                                             lnl/magento[4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min                                                                             imum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more det                                                                             ails.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further commo                                                                             n problems.

Installation failed, reverting ./composer.json to its original content.

I've made sure the credentials are correct and placed in auth.json. Currently I'm really stuck, any help would be appreciated.
Also tried to do a manual install, plugin appears in the backend but when open it, it shows an error:
2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: \MyParcelNL\Magento\Block\System\Config\Form\SupportTab
Exception #1 (ReflectionException): Class MyParcelNL\Magento\Block\System\Config\Form\SupportTab does not exist


texts: Difference between  and  handle in magento layout files

texts: I am bit confused in this two handle like when to use this two tags. Please clearfy for me like when to use this two.


texts: logs are not generating after installing patch-supee-11086 (MAGENTO 1)

texts:
New logs are not working in magento 1 after installing security patch
Mage::log('<My Values>', null, 'checklog.log', true);

Any thoughts on this ?


texts:
We have customers,orders,products etc has Entity in magento. similarly i want to create custom Entity Called XYZ.

Any Help will be appreciable!!


texts: Magento 2 Cannot create shipment Rest Api

texts: I am trying to create shipment after refund in magento through Rest Api but it is giving error "Cannot create shipment without item". My shipment was of 5 quantity out of which I have refunded 2 item and trying to create another shipment of 3 quantity but then it is giving error. Where I am wrong or Magento allow this or not?


texts: What is causing a product to be listed twice in an order, when the customer puts it in the cart once?

texts:
When a customer adds a product to their cart, and then checks out, I get an order report and they get a notification with one of the products listed twice - once as the real price, and the duplicate time as free.

These are three products that are set up as options/flavors of one main product (Gummies).  The customer selects the flavor of gummy, and adds it to their cart, then checksout, and after the order goes through, the order report shows 2 of the same product - one free, one the correct price.  This is confusing for the customer, since they didn't ever order 2 of the duplicate item.

What might be causing this problem?  And, how might I go about fixing it?


texts: Where and how is stored the value of "Use default value" checkboxes in Magento 2 database?

texts:
On my Magento 2 website, I have multiple stores.

On the product page of each store, description is not shown because it's defined globally and each product has the "Use default value" checkbox unchecked for each store.

What I'm attempting to do is changing the value of those checkboxes all at once from the database, but i can't find where and how it's stored


texts: Sales/Order Email Not Sent When Status Is 'Processing'

texts:
In Mage 1.5.1.0 with the ASchroder.com SMTP Pro Email extension, I have things properly configured, as far as I can tell, because when an order is placed and the status is pending* I get the order email. However, when the status is immediately processing*, I do not get the order email.

*Immediately set status, no further action taken, either via Magento or the related payment processor gateway.

Is this behavior by default? If yes, how can I set Mage to send email when an order with ANY status is submitted?


texts: How add declension of nouns based on numeral argument value

texts:
I know that in Magenta version 2 and above, the option for declension of nouns based on the numerical value of the argument is added:

%1 [%1|cat|cats] -> 1 cat / 2 cats

But I don’t understand how and where to add it.
Can you help?


texts: Does anyone know what the @package ConfigurableSwatches is?

texts:
I've just upgraded to CE1.9 and I'm loving the new RWD theme. One thing I've noticed is that it comes with a _configurableswatches.scss file, which states to be part of the ConfigurableSwatches package. Anyone know if this functionality is available from the core Magento modules now?

Thanks!


texts: Data migration from 1.9.4.4 to 2.3.2 magento version

texts:
I want to migrate my data from 1.9.4.4 to 2.3.2.
I am using data migration tool for this. I have installed it with no errors.
But in /vendor/magento/data-migration-tool/etc/opensource-to-opensource, 1.9.4.4 folder is not present.
How can i proceed further?


texts: Magento2: Could not save product "330664" with position 0 to category 3567

texts:
When i save product after unassigned all category from product. I am getting error Could not save product "330664" with position 0 to category 3567

I have checked log and i can see same thing in exception.log. I found that error is coming from below function
from

  Vendor/magento/module-catalog/Model/CategoryLinkRepository.php

 /**
     * {@inheritdoc}
     */
    public function deleteByIds($categoryId, $sku)
    {
        $category = $this->categoryRepository->get($categoryId);
        $product = $this->productRepository->get($sku);
        $productPositions = $category->getProductsPosition();

        $productID = $product->getId();
        if (!isset($productPositions[$productID])) {
            throw new InputException(__('Category does not contain specified product'));
        }
        $backupPosition = $productPositions[$productID];
        unset($productPositions[$productID]);

        $category->setPostedProducts($productPositions);
        try {
            $category->save();
        } catch (\Exception $e) {
            throw new CouldNotSaveException(
                __(
                    'Could not save product "%product" with position %position to category %category',
                    [
                        "product" => $product->getId(),
                        "position" => $backupPosition,
                        "category" => $category->getId()
                    ]
                ),
                $e
            );
        }
        return true;
    }

But not able to find actual cause to throw it. does anyone face same issue?


texts: How can I make my controller return JSON back to my template PHTML

texts:
Controller:

<?php
namespace MyCompany\ExampleAdminNewPage\Controller\Adminhtml\Product;

use Magento\Framework\App\Action\Context;
use Magento\Framework\Controller\ResultFactory;

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

  /**
   * @return \Magento\Framework\Controller\Result\Json
   */
  public function execute()
  {
    /* Create array for return value */
    $response['value1'] = "Value one";
    $response['value2'] = "Value Two";
    $response['value3'] = "Value Three";

    $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON); //create Json type return object
    $resultJson->setData($response); // array value set in Json Result Data set

    return $resultJson; // return json object
  }
}

Calling from PHTML:

fetch('http://localhost:8888/magento2/rest/V1/integration/admin/token', {
            method: 'POST',
            mode: 'cors',
            cache: 'no-cache',
            credentials: 'same-origin',
            headers: {
                'Content-Type': 'application/json',
            },
            redirect: 'follow',
            referrer: 'no-referrer',
            body: JSON.stringify({
                "username": "admin",
                "password": "admin1@admin.com"
            }),
        })
        .then(response => response.json())
        .then(token => {
            (function($) {
                $.ajax({
                    type: "POST",
                    url: "<?php echo $block->getUrl('*/product'); ?>",
                    data: dataBody,
                    dataType: "json",
                    contentType: "application/json",
                    beforeSend: function(xhr) {
                        xhr.setRequestHeader ("Authorization", "Bearer " + token);
                        xhr.setRequestHeader ("Content-Type", "application/json");
                        if (xhr && xhr.overrideMimeType) {
                            xhr.overrideMimeType("application/j-son;charset=UTF-8");
                        }
                    },
                    success: function(html) {
                        console.log("success: ", html);
                    }
                });
            })(jQuery);
        });

However, when I try to do this on I can see that the URL is correct but it returns 401 Unauthorized

Request URL: http://localhost:8888/magento2/admin/exampleadminnewpage/product/index/key/bfa7629e0c8323d434158ed68e5dd61f9e0d8ca428f859eb916412c740c89d72/
Request Method: POST
Status Code: 401 Unauthorized

And I can see this error in the Debug Logs

main.DEBUG: Request validation failed for action "Magento\Framework\App\Action\Forward\Interceptor" [] []

Any Idea what is happening here? I am new to Magento and PHP.


texts: Magento layered navigation attribute option sort by name not position

texts:
Basically Magento attribute option takes database order by default if we provide position it will shows based on that order. Like below

 color:  blue
            green
            black

    size:   s
            xl
            M
    housing: 9
             5
             99
             10
             bold
             ancle
             raise
             home

Like this I created Option same way it will in front end layered navigation

But my requirement is need to show in front end like below

color: black
       blue
       green
size:  m
       s
       xl

housing:     5
                 9
                 10
                 99
                 ancle
                 bold
                 home
                 raise

like this I need I don't want to provide position for every attribute option because I have lot of options having some attributes, so I am planing to display alphabetically, how admin created I don't care.

If anyone knows please help me where to change this order


texts:
My php version php 7

How can I solve this issue?


texts:
In my website homepage there are multiple bundle js

<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle0.min.js"></script>
<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle1.min.js"></script>
<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle2.min.js"></script>
<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle3.min.js"></script>
<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle4.min.js"></script>
<script  type="text/javascript"  src="https://website.com/static/version1545621016/frontend/website/default/fr_FR/js/bundle/bundle5.min.js"></script>

why all are there?I want to remove it for homepage


texts: Magento 2 : How to add image upload in ui form

texts: How to add image uploader as like in the category?


texts: Is it possible to get a product collection bassd on array of product ids?


texts: Magento: How can I add two or more static Blocks on category page

texts: I am creating category page and i want to add two static blocks to it. While I was going through CMS/Static Blocks, I realized I can Only add One Static Block to any page. I couldn't find anything where i can add 2 or more static blocks. Is there a way i can add two or more such static blocks in a single category page.


texts:
In the Porto Theme it says 'Sign in' I want to change it to 'Inloggen'
I don't know what to change in the code. Can someone help me please?
<?xml version="1.0"?>

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

        <referenceBlock name="header.links">
            <block class="Magento\Customer\Block\Account\Customer" name="customer" template="account/customer.phtml" before="-"/>
            <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="account/link/authorization.phtml"/>
        </referenceBlock>
        <block class="Magento\Theme\Block\Html\Header" name="header" as="header">
            <arguments>
                <argument name="show_part" xsi:type="string">welcome</argument>
            </arguments>
        </block>
        <move element="header" destination="header.links" before="-"/>
        <move element="top.links" destination="customer"/>
        <move element="authorization-link" destination="top.links" after="-"/>

</page>

HTML output:

        Sign In

Thanks for your time already!


texts: Magento 2 override associated product price (configurable and it's child)

texts:
I have all configurable products on my website and I want to add the extra charges (after some calculation and conditions) to product price by overriding method or anything else which follow the Magento standard.

I have follow the following scenario:
I have tried this by using plugin method. It override the configurable product price only not it's child. Also not working properly on product list page.

1.etc/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\Catalog\Model\Product">
    <plugin name="product_price_change"
            type="Namespace\Modulename\Plugin\Updateprice"
            sortOrder="1"/>
</type>
</config>

2.Plugin/Updateprice.php
<?php
namespace Namespace\Modulename\Plugin;

class Updateprice
{
    /**
     *  \Namespace\Modulename\Helper\Data $helper
     *
     * @var Namespace\Modulename\Helper\Data
     */
    protected $_helper;

    protected $_configurable;

    protected $product;

    public function __construct(
        \Namespace\Modulename\Helper\Data $helper,
        \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable $configurable,
        \Magento\Catalog\Model\Product $product
    ) {
        $this->_helper = $helper;
        $this->_configurable = $configurable;
        $this->_product = $product;
    }

    public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result) {
        if($subject->getTypeId() == "configurable"){
            return $result + $this->_helper->getAdditionalPrice($subject);
        }else{
            return $result + $this->_helper->chkAdditionalPrice($subject);
        }
    }
}

getAdditionalPrice function is defined in helper which have some calculation and return additional price according to product attribute otherwise it returns false;
I have also tried catalog_product_get_final_price magento event. This is working fine for "Simple Product" not for the associated simple product (configurable simple product).

I want to carry configurable product price to cart and checkout.
Any suggestion would be appreciated.
Thanks


texts: Magento 2 can't login admin page after migration from local server (XAMPP)

texts: I need urgent help as to how to log into my admin page. Everything is working fine after migration but admin page refuses to log me in. I have tried so many suggestions here. But not is working for me. I use Magento V2.2.3


texts:
I am trying to get the product quantity in observer event catalog_product_type_prepare_full_options but even if i try to add more than one, the observer returns 1 as quantity

    $product = $observer->getEvent()->getProduct();

    $productqtty = $product->getQty();

$productqtty always returns 1

What could be wrong?


texts: Magento 1.X and MasterCard 2-Series BIN. Will it work?

texts:
As some of you may be aware MasterCard is launching 2 Series BIN, and there are steps required for merchants to be compliant.
More on this topic:
https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html

Is Magento 1.x compliant with such changes?


texts: Magento widget to display in wordpress home page

texts:
I inserted 3 widget in CMS -> Pages. I have to do display those widgets in home page.

I used this code

$aCmsPage = Mage::getModel('cms/page')->load('main-page', 'identifier');
echo $theContent = $aCmsPage->getContent();

but output was like this

{{widget type="meigeewidgets/featuredcategory" featured_category="category/5" template="meigee/meigeewidgets/slider.phtml" products_amount="15" slider_speed="1000" slider_displayslideqty="4" slider_moveslideqty="1" slider_easing="easeInQuad" widget_id="7646"}}

i am new to magento. Can you please help me to find a solution?


texts:
can anyone help me to solve my problem "A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later." when we test email
plzzz help me as soon as possible


texts: How Can I Set price Column Optional for Virtual Products Only

texts:
I need to set price optional for Virtual particular products, not for my all products. How can i import items without price.

Note : not for my all products.


texts:
I did install a SSL certificate in our production environment, but the problem is than some images and javascript files are loaded by http (Mixed content).

Our architecture is:

SSL (nginx) listen on port 443
Varnish listen on port 80
Magento (apache) listen on port 8080

Routing is in the follow order:

SSL server
Varnish
Magento

Note: All the servers are virtual servers.

I changed in Magento Settings the Secure Base Url to https://www.ourdomain.com

Thanks in advance!


texts: Update total using 'sales_quote_save_after' event in magento 2?

texts:
I am trying to update Total amount if any user select "flat rate" shipping method. To achieve this, I've created a custom module using 'sales_quote_save_after' event observer. And getting user selected shipping method on checkout first step.

Here is my observer event which I've created.

Although I'm getting selected shipping method but cart total not updating. And I'm not getting what should I do to update Total.

public function execute(Observer $observer)
    {
        $quote= $observer->getEvent()->getQuote();
        $id = $quote->getId();
        $method = $observer->getEvent()->getQuote()->getShippingAddress()->getShippingMethod();
        if($method == 'flatrate_flatrate'){
            $charge = 10;
            $fee = $quote->getFee();
            $total = $objectManager->get('Magento\Quote\Model\Quote\Address\Total');
            $total->setTotalAmount('fee', $charge);
            $total->setBaseTotalAmount('fee', $charge);
            $total->setFee($charge);
            $quote->setFee($charge);
            $total->setGrandTotal($total->getGrandTotal() + $charge);
            $total->setBaseGrandTotal($total->getBaseGrandTotal() + $charge);
        }
        return $this;
    }


texts: How to use Custom Module Js to RequireJS

texts:
I add my custom Module to JS to requirejs-config.js File

    var config = {
        paths: {
            'Test/jquery':"Test_Header/js/jquery.min" ,
            'Test/popup':"Test_Header/js/jquery.magnific-popup" ,
            'Test/three':"Test_Header/js/three" ,
            'Test/async':"Test_Header/js/async" ,
            'Test/orbit':"Test_Header/js/OrbitControls" ,
            'Test/theta':"Test_Header/js/theta-viewer"

        },
        shim: {
            'Test/jquery': {
                deps: ['jquery']
            },
            'Test/popup': {
                deps: ['jquery']
            },
            'Test/three': {
                deps: ['jquery']
            },
            'Test/async': {
                deps: ['jquery']
            },
            'Test/orbit': {
                deps: ['jquery']
            },
            'Test/theta': {
                deps: ['jquery']
            }
        }
    };

After I call this js to Template File:

    require(['jquery', 'Test/popup',  'Test/async', 'Test/theta' ],function($) {
            $(window).load(function () {
                $('#td').click(function () {
                    if(load==false) {

                        $('#threed').css('display', 'block');
                        $('.cpimage').css('display', 'none');

                         var viewer = new ThetaViewer( document.getElementById('threed') );
                         viewer.images = ["<?php echo $tsy; ?>"];
                         viewer.interval = 200;
                         viewer.autoRotate = true;
                         viewer.load();

                         }
                 });
            });
        });

Now All  Js File Are Loading Fine in Net Tab, But Throw Error IN Console ReferenceError: async is not defined

Reference:{async load }

Reference: [async error]

All Js are Loaded, But throw this Error. I tested All js Are working IN locally fine, But, While Integrating Magento2(requirejs), throw this error.   Suggest Me  Why This Issue Occur and How to Solve this.


texts: Magento2 enabling elasticsearch empties all categories

texts:
I installed elasticsearch and the Magento backend connection test to elasticsearch is successful.
If I save settings, clear the cache and reindex as described in the Magento devdocs, all product cateogries are empty and my search function has no result, whatever I type in there. I can still access the products with the direct url, thats all.
If I switch back to MYSQL as search engine and clear the cache all products are back.
Both Magento and Elasticsearch are Ubuntu18.04 servers, Magento 2.3.2 and Elasticsearch 6.8.3.
Any idea where I can take a deeper look or how this problem can be solved?

EDIT: Some product attributes were not enabled for search (but not all! So there must have been results before). I reindexed and now the ES shows very good results! But as before, product pages are empty.

EDIT 2: Its a Multistore. The website id 1 works with ES, all other websites have no search results – and everywhere empty categories.


texts: Sftp not able to connect in magento2.2.5?

texts:
I am not able to connect to Sftp in magento2.2.5

Here is my code:

public function execute()
    {
        $connection = $this->sftp->open(
                    array(
                        'host' => 'myhostname',
                        'username' => 'myusername',
                        'password' => 'mypassword',
                        'port' =>22,
                        'passive' => true
                    )
                );
        if($connection){
        echo "true";

        }else{
            echo "false";
        }
                //print_r($connection);
        die;

But it is returning false.

I don't know what is the problem.

Any help would be appreciated.


texts: Show simple products SKU on product page when the attributes of a configurable product is selected

texts: I'm fairly new to Magento and am currently running Magento 2.2.1. I am looking for a way to have the configurable sku change to the corresponding simple product sku when the configurable products attributes have been selected.


texts: Is there a confirmed way to add a product to the cart using URL in magento 1.8?

texts:
There are loads of articles and posts about doing this in previous versions using several different URL strings, all of which none work in Magento 1.8

Has anyone actually figured out a way to do it yet?

For example, this is listed on the Magento Wiki and was added in 2010:
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/adding_a_product_to_the_cart_via_querystring

/path/to/app/checkout/cart/add?product=[id]&qty=[qty]

However when clicked, this link just refreshes the cart.

Just incase anyone wants to see how I'm trying to code it:

<button type="button" title="Add Loan Phone" class="button" onclick="setLocation('URL HERE')">Add a Loan Phone (+£10)</button>


texts: Alternative to Authorize.net Direct Post?

texts:
Magento2 - payment method Authorize.net developer support notes that Direct Post Method is deprecated which is replaced with Accept.js.

  Are there any plans for Magento 2 Community Edition to integrate with
  Authorize.net in this way?


texts:
I am totally new to Magento (having previously used Zencart for all my stores), but I like to look of it and am after a more professional cart for my next project.  Magento looks good.

I will be selling "personalised stationery items" which have options associated with them such as

choose from 30 colours
choose from 10 patterns
choose from 10 "designs"

(So 30*10*10=3000 combinations).  I want the image shown in the product page to change based on the user's selection of colours, patterns and designs.  The price would be the same no matter which options they select.  Although I may have one or two other "attributes" that would influence the price....Does anyone have any first hand experience of an extension that would do the colour pallete thing for me (I would need the visual pallet itself to hold image files of my choice so it can work for colours and patterns etc).

I'm starting to get my head around products types, specifically simple and configurable.  How would you experts implement this?  Can I do this as a simple product with attributes or so I need to use a configurable product in some way?  Configurable products seem complicated compared to the simple products so what is the advantage?  What can be done with a configurable product that I can't do with a simple product?

Any pointers you can give me would be much appreciated!

Thanks
Gary


texts: How to capitalize button text like “Add to Cart”?

texts:
Right now my 3rd party theme shows "Add To Cart" which means every first letter of a word is cap.
I want Magento 2.4.1 to display all buttons in capital letters.
For example Add To Cart -> ADD TO CART, Place Order -> PLACE ORDER etc.
I would like to make changes in the CSS and not translation files.
Thanks for your help.


texts: Error filter template : Email template '' is not defined

texts:
When creating a custom email header for a email template it gives an error in the email's body.

  Error filtering template: Email template '' is not defined

I have placed in the header using this convention in the email template body (which is just overridden in the theme email)

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

I have put the template id into email_templates.xml inside the main module (I know it's bad practice, but for now, please humour me till I fix the main issue)

It is as if it doesn't find it's name for whatever reason or something? It is literally two ' in a row with no name. I did at the time have a - in the label in the section below. It might not have liked that?

<template id="design_email_header_changed_template" label="Header Changed" file="changed_header.html" type="html" module="Magento_Email" area="frontend"/>

I have put the template header in the module under the frontend folder on the root as well as the theme folder (again, I know bad practice, but I'm just trying to figure out what is going on).

I have also updated the config.xml to include the header template:

<header_template>design_email_header_changed_template</header_template>

I am unsure of what I am doing wrong for the system to not retrieve the html file to spit out the template or, rather find the template.

Thanks!


texts: After installing a module, it appears in my back office but when I click on it, I get this message that appears:


texts:
How I can upgrade Magento from 1.4 to 1.9? Is there any migration tool available?

Because when I upgrade 1.4 to 1.9 then at admin > customer when I click on particular customer row for edit then it is display following error :

  a:5:{i:0;s:34:"Can't retrieve entity config: eav/";i:1;s:4915:"#0
  /var/www/html/magento_1.9.3/app/code/core/Mage/Core/Model/Resource.php(282):
  Mage::throwException('Can't retrieve ...')


texts: How can I prevent my cart form being empty after checkout payment failure magento2?

texts:
magentno 2 I want user to keep its shopping cart after payment failure. Cart becomes empty when cancel the payment transaction in checkout.

How should I change the Failure.php in Magento checkout module?


texts: Magento cron.php Does Nothing After it Runs

texts:
My Magento cron works normally about a few months ago. But recently, it suddenly stop generating schedule. The cron command itself running fine in my hosting server. It is Magento ver 1.8.0.0.

These are what I have tried:

I try executing cron.php in the browser, and it doesn't generate schedule in cron_schedule table.
Install AOE Scheduler extension, hoping it can solved the problem. I can generate schedule using this extension, but Magento cron cannot execute the cron schedule.
Install fresh Magento ver 1.8.0.0 in hosting server, and then executing cron.php in the browser, cron_schedule table still empty.
Install fresh Magento ver 1.8.0.0 in my localhost, and then executing cron.php in the browser, it generates schedule. So I try to upload it to the hosting server. I clear Magento cache, then executing cron.php in the browser, surprisingly nothing happen in cron_schedule table. But it works fine in my localhost.

I have another Magento site ver 1.7.0.2 in the same hosting server, the cron is working fine.

I still don't know what the cause of this problem, so I post it here. Hoping that somebody have the same problem, and share the solution.


texts: Header Links showing twice under the Account Links in Mobile Menu Magento 2

texts:
I am getting Header Links twice under the Account Links in Mobile Menu. I have attched screenshot of that. You can see in the image there is twice header links under account tab. I'm using porto theme with Magento 2.3.2.

Any help?

Thanks in advance...!!!


texts: Alert admin when order is made with a specific payment method

texts:
We currently have, on our site, the option to make payment either by credit card or Bank transfer. We would like a way for the admin to receive an alert email when payment is made using the Bank transfer method. We can get the system to send an email every time an order is made but we'd like to send a specific one, just for Bank transfer orders.
Is there a way to do this?
Thank you.


texts: Magento 2: New theme saving issue on Admin WAMP

texts:
In continue with Magento 2: How to override Luma Theme Home Page

I'm getting error

  Cannot read contents from file "D:/wamp/www/magento2/"
  Warning!file_get_contents(D:/wamp/www/magento2/): failed to open
  stream: No such file or directory

As i'm using Magento 2 CE on WAMP Windows 10, it shouldn't be file permission issue.


texts: Delete cross-sell links programmatically

texts:
I have a problem concerning the cross-sell links. I'm building a custom module and I need to add and delete cross-sell links according to a product.

I know how to create the cross-sell links using:

$product->setCrossSellLinkData($params);
$product->save();

But what I don't know is how to remove cross-sell links.

Is there a function to do that or have I to execute an SQL request to delete the links from magentocatalog_product_link inside my module (which isn't a good practice) ?

Thank you for your help


texts: Magento 2 store view same product with different stock levels

texts:
I have set up 2 stores views eg. uk/us  both have exactly same structure of categories same products etc... except for the stock qty levels. I've been playing around and I know for fact I can disabled the product for a specific store view and change description,name,sku etc... except qty per store view.

I am little bit confused what is possible and what is not is this is possible out of the box or it will need an extension or any other ideas how can one achieve this?

Thanks!


texts: Attaching license key to downloadable products in Magento 1

texts:
I'm trying to find a way to attach a license key to either downloadable or virtual products.
Can't seem to find any extension that will help me achieve this.

What we're selling is an Anti-virus software, and it's crucial that we can attach these keys, when our customers buy the product.

Until now, we've been sending it out physically and just adding the license key on a piece of paper. But we want to digitalize it now.

Hope someone can be of assistence.


texts: Update is_qty_decimal or inventory_is_qty_decimal via API

texts:
Against a product in admin, if you go to Advanced Inventory, there's a Yes/No dropdown for Qty Uses Decimals.  I would like to know how to update this field via the API, since I need this enabled, and I push into Magento 2 via the API.

I've tried searching in endpoint /V1/products/attributes but can't seem to find it.


texts: Why are products that are not linked to a category visible in search results?

texts: In my webshop products that are enabled but not linked to any Category are being displayed in the search result. Is there a way to prevent this?


texts: Magento - How to calculate Price by Weight

texts:
I am having trouble with the Magento shopping cart.

I want the final price to be calculated by the product weight. I have entered the weight in product details and the price but still in the shopping cart i get the Subtotal without a weight calculation. How can I fix this.

Currently the shopping cart qty unit is multiplied by price to give mt the price.
Instead I want when qty = 1 WEIGHT X PRICE


texts: Join stock inventory resource to the product collection

texts:
could you please help me join the stock inventory resource to my grid.php?
I would like to edit my grid in order to filter by availability "is in stock".

Tried adding this code, but without joining the resource it will not work.

    $this->addColumn('inventory_stock_availability ',
            array(
                'header' => Mage::helper('catalog')->__('Status'),
                'width' => '100px',
                'index' => 'inventory_stock_availability',
                'type' => 'options',
                'options' => Mage::getSingleton('catalog/inventory_stock_availability ')->getOptionArray(),
            ));

my grid file is just like this one https://github.com/jayelkaake/enhancedgrid/blob/master/app/code/community/TBT/Enhancedgrid/Block/Catalog/Product/Grid.php


texts: How to write that layout XML in a template file?

texts:
This is my layout XML:

<block type="amazonpayments/pay_button" name="product.info.addtocart.amazonpayments" template="creativestyle/amazonpayments/pay/product/button.phtml" before="-">
            <action method="setIdSuffix"><value>product</value></action>
            <action method="setEnableOr"><value>1</value></action>
            <action method="setIsProductButton"><value>1</value></action>
        </block>

I used this code in my template file but I think the parameters (like setIdSuffix) are missing:

echo $this->getLayout()->createBlock('amazonpayments/pay_button')->setTemplate('creativestyle/amazonpayments/pay/product/button.phtml')->toHtml();

This gives no errors but the corresponding button is not shown either. Any ideas what might be wrong?

Magento 1.9

Thanks


texts: i applied language pack. But imperfect language. How can i to do?

texts:
I applied Korean language pack.
what i did,
I unzipped pack at \app\i18n\mageplaza\ko_KR and cache clean, cache flush, bin/magento setup:static-content:deploy ko_KR -f.
Some words are applied perfectly but others like this 대시보드",module,Magento_Sales Use Aggregated Data"
or not translated. help me thx


texts: Admin grid: Response is not displayed in Backend in magento2

texts:
I have created admin grid and associated form,It saved the items and worked good, But failed to show the response message.Please provide me a solution

<?php

namespace X\Y\Controller\Adminhtml\aaa;

use X\Y\Model\ImageFactory;
use Magento\Framework\Message\ManagerInterface;

class Save extends \Magento\Backend\App\Action
{

    protected $model;
    protected $_messageManager;

    public function __construct(
    \Magento\Backend\App\Action\Context $context, ImageFactory $model, ManagerInterface $messageManager, \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory, \Magento\Backend\Model\Auth\Session $authSession
    )
    {
        $this->_messageManager = $messageManager;
        $this->model = $model;
        $this->resultRedirectFactory = $resultRedirectFactory;
        $this->authSession = $authSession;
        parent::__construct($context);
    }

    public function execute()
    {
        $id = $this->getRequest()->getParam('id');
        try {
            $imageData = $this->model->create();
            //If gets id loads the model
            if ($id) {
                $imageData = $imageData->load($id);
            }

            $formData = $this->getRequest()->getParam('general');
            $user = $this->getCurrentUser();

            if (empty($formData ['id'])) {

                $formData['id'] = null;
                // update the current user name for both created and updated
                $formData['created_by'] = $user;
                $formData['updated_by'] = $user;
            }

            $formData['updated_by'] = $user;

            if (isset($formData['image'])) {
                $formData['image'] = $formData['image'][0]['name'];
            } else {
                $formData['image'] = null;
            }

            //Set all the data in DB from form
            $imageData->setData($formData);
            $imageData->save();

           //After saved the item it failed to show the below success message
           $this->_messageManager->addSuccess(__("Your Slide has been saved !"));

        } catch (Exception $e) {

            $this->_messageManager->addError($e->getMessage());
        }
        //Result redirected to index controller
        return $this->resultRedirectFactory->create()->setPath('a/b/index');
    }

    public function getCurrentUser()
    { //Get the current user name using session
        return $this->authSession->getUser()->getUsername();
    }

}


texts: How to get rendered prices from configurable products?

texts: i need to show the save label or percentage to configurable product under each and every simple products when click dropdown contents.(like size attribute dropdown contains size32cm has price RS:54 and size33cm has RS:56 )


texts: Product with special price should not applied for a discount in shopping cart using promotion rule

texts:
I have made one promotion rule for shopping cart. If product has price $7.99 from specific category, will get fixed amount of discount $5. This promotion rule is not working well when some products from same category and had price $7.99 applied a special price of $0.99 or something else, got the fixed amount of discount of $5. By this that product sold at $0.

To fixed this issue , I tried the condition
if special price from that category product has value greater than 0.(if this is true, then discount shouldn't applied). but this condition fail when special price time period is over.
I also tried 'price in cart' condition. But it is not working.

Can anyone tell me what should be the condition, so special price product should not get discount in shopping cart ?


texts: How to keep company field optional in magento 2

texts:
I want to override Shipping address field
At present, the shipping address, Company Name is a required field

https://www.screencast.com/t/8PgjgHxoM

Occurs in the checkout page.


texts: Description and additional Info Tabs showing twice

texts:
I am new to Magento, took the leap from Zencart following lack of support
I have purchased a theme from an online template supplier, who I then had to pay more money to to get it to install properly (Instructions were inadequate)
However I am still having problems, but the theme supplier is ignoring support requests (Unless I pay more money)
When you view any of my product, there is two rows of Product Desciption, Additional Info and Product Review Tabs. It would appear to be both the "Default ones AND the Theme based ones at the same time
Can anyone point me to either where I turn it off in Admin or where I need to alter the code to get it to work properly.
Needless to say it wasn't like this on the Demo site

Example page (I must warn you, it is an adult toy store)
http://specialcuddles.com/catalog/product/view/id/1234/

Hope somebody can help

Regards


texts: Admin error : "The value specified in the URL Key field would generate a URL that already exists."

texts:
I am trying to modify my category structure as part of creating a new shop with Porto and Magento 2.
My products were migrated to m2 from m1 using the Migration Tool.
I have been deleting categories and creating new ones. That has worked fine. However, now I am trying to allocate products to categories I am facing errors that say:
"The value specified in the URL Key field would generate a URL that already exists."
I have tried various fixes, such as:

deleting the Rewrite rule for the referenced error URL
updating the URL Key for the referenced error URL
changing the URL Key for the category
deselecting "Create Permanent Redirect for old URL" and changing URL Key for the category

I have read various issues concerning use of URL Keys and rewrite rules but nobody seems to have a definitive answer. My problem is the same as the one referenced here:
The value specified in the URL Key field would generate a URL that already exists after migration from M1
It would be great if someone had a definitive answer to how to fix this error as my categories will not work unless I can get this fixed.
Help! :-)


texts: I am getting too many redirect issue in magento 2

texts:
why I am getting too many redirect issue in Magento 2.3, PHP 7.1
I have tried almost each and everything whatever described in the Magento stack exchange, Github, Magento community etc but still I am getting error
run all commands
permissions set
from core_config_data tried admin_html = 0 and even 1
tried almost each and everything but still the same issue and the most important thing I have cleared the cache of browser cleared cookies and Magento cache also


texts: Is it possible in Magento to remove the checkout steps completely?

texts: I have a design for a checkout page on magento and everything is displayed all at once without the steps, is it possible to have the checkout page as just one big checkout without the ajax loading in new content after step progression.


texts: how to add order grid serializer in custom module

texts:
i want to create the Order Grid Serializer functionality.

If Anyone create that type functionality then please guide me..


texts: how to pass values from controller to view

texts:
I am new in magento. I facing a problem that i want to pass my values from my controller to my view page. But I don't know the syntax. Please anybody help me.
This is my controller: -

<?php
class Test_Mymodule_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
         $this->loadLayout();
         $this->renderLayout();
    }

    public function calculateAction()
    {
        $request = $this->getRequest();
         if($this->getRequest()->isPost())
         {
             $printdata = $request->getPost();

         }
         else
         {

         }

         $helloworld = Mage::getModel("test_mymodule/results");

             $helloworld->helloworld("helloworld");

    }
}

I want to display the value of $helloworld to my view name "calculate".


texts: Adding a custom field to Order admin screen

texts:
I'm trying to add a custom field to the order admin screen, specifically a dropdown box with the information appended to the order.

I have created a custom module, which has the structure:

etc -> with config.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Custom_Module>
            <version>0.4.0</version>
        </Custom_Module>
    </modules>

    <global>
     <resources>
         <Custom_Module>
              <setup>
                  <module>Custom_Module</module>
                  <class>Mage_Sales_Model_Mysql4_Setup</class>
              </setup>
               <connection>
                <use>core_setup</use>
              </connection>
         </Custom_Module>
     </resources>
 </global>
</config>

sql -> Custom_Module_Setup/mysql4-install-0.4.0.php

    $installer = $this;
$installer->startSetup();

$options = array(
    'value' = array(
        'test' => array('test'),
        'test2' => array('test2'),
        )
    );

$installer->addAttribute('order', 'test_option', array(
    'label' => 'Test Option',
    'default' => '',
    'type' => 'varchar',
    'input' => 'select',
    'visible' => true,
    'required' => false,
    'position' => 1,
    'visible_on_front'  => false,
    'option' => $options,
    'default' => array('web'),
));

$installer->endSetup();

I also have in modules

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

From what I can tell, the module is activated, and config file is read but the install file is not?
The attribute is not appearing as a column in sales_flat_order (I have been flushing the cache while testing each time)

So question 1 what am I doing wrong?
Question 2 once I have it appearing in the column, how can I then display/save it in the order edit screen?


texts: site crashed after changing css settings

texts:
On my Mac localhost, in admin - store - configurations, I changed my css compilation to client side configuration in advanced and now everything is fried and I can't get back. This is the result:
FileError: 'http://127.0.0.1/Magento/pub/static/version1489371700/_cache/merged/source/_responsive.less' wasn't found (404)
in db6b6fc668e0d14d1ee9a8f367faf3db.css on line 30, column 1:

29
@import 'source/components/_rules-temp.less';

30
@import 'source/_responsive.less';

31
/* The above import directives are aggregated from content. */


texts: How do you send additional attributes to order using /rest//V1/guest-carts/{cart-id}/order REST API Magento 2?

texts:
I have successfully placed order by creating cart and finally calling rest api /rest//V1/guest-carts/{cart-id}/order to place the order. Now I am trying to add an additional attribute custom_attribute to be displayed on orders table page of admin dashboard but am unable to figure out the way around.
I have tried to extend the magento functionality using following link but somehow cannot set custom attribute via rest api
https://www.yereone.com/blog/magento-2-how-to-add-new-order-attribute/


texts: Magento 2 : Only show products that is uploaded by admin user

texts: I have created an admin user from admin panel and assign a role to it in which this user only add and see products, but i want it to only show the product that he uploads not others product.


texts: Refresh header.phtml on click on add to cart button

texts:
I am making a Free Shipping top bar, i have added code in header.phtml which is located in app/design/frontend/mytheme/mytheme05/template/page/html/header.phtml

My Code is :

<?php

$grand= $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal());

$count = (int) filter_var($grand, FILTER_SANITIZE_NUMBER_INT);

$umer= 1500;
$total= $umer-$count;
if ($count < $umer)
{
    echo "Free Shipping on $total";
}

else
    echo "Free Shipping Enjoy";
//var_dump($count)

?>

I want to refresh this div when Add to cart Button is press.

The code is located in :

app/design/frontend/mytheme/mytheme05/template/magiccart/magicproduct/product/grid.phtml

Code is here`

<?php if(in_array("cart", $actions)):?>
    <?php if($_product->isSaleable()): ?>
        <button type="button" title="<?php echo $this->__('Add to cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Umer') ?></button>
    <?php else: ?>

<?php echo $this->__('Out of stock') ?>

    <?php endif; ?>
<?php endif; ?>

I want to refresh that div on onclick Button.

How I can do this ?


texts:
I am new to Magento & using Magento 2.1.7 in my windows system while running the following command in CMD

php update/cron.php

It is showing an error Update-cron: Please check var/log/update.log for execution summary

& in my log file it is showing this in the log

  [2017-07-15 11:10:27] update-cron.ERROR: Cron readiness check failure!
  Found non-writable paths:
    C:\xampp\htdocs\magento_test/app/design/adminhtml/Magento [] []

I am not  getting that exactly where is the problem with it.


texts:
By default, the words "CHECKOUT METHOD" are displayed over the first step on Magento 1.9.2.   I need to remove those words.   I can not find where to edit this line.  Does anyone know?

Thank you,

Please see image below.


texts: Change Firstname, Lastname label in customer registration in Magento2.1.7?

texts: How to change label Firstname, Lastname only in Customer registration in Magento2.1.7?


texts: Magento2: Add Checkout Terms and Conditions to Customer Registration Page

texts:
I am trying to include terms and conditions that are shown on the checkout on the customer registration form. I have tried various ways and managed to get it to display correctly but no matter what I try I cannot make it work as a required field and each attempt the customer can still register without agreeing to the T&C's.

Any help or suggestions on the best way to implement this would be really appreciated!


texts:
I'm using ultimo theme for a multi store configuration.
Since I have to update the theme regularly I don't want to make changes to the base files of it.But I've to make some changes which apply to all stores and severel specific changes within each store. Thats why I'm trying to create one child theme and a grandchild for every store. So I can make modifications for all stores within the child theme and modifications for specific stores within the grandchild themes.

I'm not sure if this is the usual way to do this but it seems to me most obvious and I havn't read that the theme inhgeritence is limited.

I've used the official guide to create the child themes. Unfortunatelly the changes made within allstores does not apply to my frontend which uses a grandchild theme. Maybe I made a misconfiguration, but I can't find it.
When I apply the 'allstores' theme to my frontend I see the modifications, so I can assume that the 'allstores' child theme is well configured.

I've cleared the chache, re-indexed and forced to deplay after that.

php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy -f

The theme.xml of the grandchild themes I set as follows:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Store1</title>
      <parent>infortis/allstores</parent>
      <media>
          <preview_image>media/preview.jpg</preview_image>
      </media>
 </theme>

And the composer.json is configured like this:

{
    "name": "infortis/theme-frontend-store1",
    "description": "N/A",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0",
        "infortis/theme-frontend-allstores": "^2.0.0"
    },
    "type": "magento2-theme",
    "version": "2.8.0",
    "license": [
        "Proprietary"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

This displays how my theme folder actually look like:

app/design/frontend/
├── infortis/
│   │   ├──base/  <-- core files
│   │   │   ├── ...
│   │   ├──ultimo/  <-- core files
│   │   │   ├── ...
│   │   ├──allstores/ <-- child theme
│   │   │   ├── ...
│   │   ├──store1/ <-- grandchild theme
│   │   │   ├── ...
│   │   ├──store2/ <-- grandchild theme
│   │   │   ├── ...

Do I miss somthing or arn't grandchild themes supported?


texts: problem with removing code from "miscellaneous scripts"

texts:
After remove code script remained characters }); although field is empty. Now, they can be seen on all pages.

Prompt please where magento saves scripts?


texts: i'm trying to add multiple user registration form in my magento. I am beginner in magento so how can i add multiple form in my magento website


texts: How to Show only Lowest Price Duplicate Product in Catalog listing..?

texts:
I am duplicating the product programmatically by keeping the same name and images but with different Prices and sku and displaying it in the same Category.
When I go to Product Listing page, all the duplicated products and the Parent product are displayed but with different price and sku.
I want to filter the catalog listing such that only the product with lowest price(among the duplicate products including their parent product) should be displayed.


texts:
At 300px the page body has 0.3 opacity. For some reason, regardless of the order of these rules in the less file - they are always outputted into the file in the wrong order. Am I being stupid? Is this just me?

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__xs) {
    body {
        opacity: 0.7;
    }
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    body {
        opacity: 0.3;
    }
}


texts: Old themes in the Design configuration page of Magento 2?

texts:
I've deleted all TemplateMonster theme files and it's still showing in the Design configuration page.

Process completed to remove themes:

Remove theme files from app/design/frontend
Clear static file cache
Remove from var/

There's also Testing Custom Theme that shows two instances for reason, but in app/design/frontend there's only one. (I've cleared static file cache)

Any experience with this strange behavior, folks?


texts:
i have a form it's like assign a product through frontend. but my doubt is after that how i validate

<form action="<?php echo $this->getUrl('mpassignproduct/index/edit') ?>" enctype="multipart/form-data" method="post" id="form-customer-product-edit">

*<?php echo $helper->__('Sku')?>

<input type="text" name="sku" id="sku" class="required-entry input-text" value="<?php echo $mpAssignProductModel->getsku() ?>"/>

</form>

i upload to this form and store it db my problem if same sku also upload how i restrict that.


texts:
I run a fairly trafficked store with 30 stores and 20 websites. It works fine when things are cached, but without the config cache enabled, the site is extremely slow.

This means that when I deploy things, the web server gets completely overloaded until the cache has been saved and i over and over again restart PHP-FPM. It just an epic DOS beating me to death that also brings me clients with baseball bats every day, who also want to beat me to death.

How do you all handle high trafficked stores with so many stores + websites (typical global store)? I don't want the solution to be "add more hardware", especially not since media is so hard to scale


texts:
I'm working on functionality that cares about the customer group. Currently we are loading the group code whenever we need it:

Mage::getModel('customer/group')->load(Mage::getSingleton('customer/session')->getcustomerGroupId())->getCustomerGroupCode();

What I'd like to do is just go ahead and have the customer model get this bit of data when the customer is being loaded. How can I accomplish this? Further, is it the most practical way to handle this?


texts: magento 2.1 can not create grouped product

texts:
I can not create grouped product from the admin panel it gives the below error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'position' in
'order clause', query was: SELECT `e`.*, `at_status`.`value` AS
`status`, `links`.`link_id` FROM `catalog_product_entity` AS `e` INNER
JOIN `catalog_product_entity_int` AS `at_status` ON
(`at_status`.`entity_id` = `e`.`entity_id`) AND
(`at_status`.`attribute_id` = '94') AND (`at_status`.`store_id` = 0)
INNER JOIN `catalog_product_link` AS `links` ON links.linked_product_id
= e.entity_id AND links.link_type_id = 3 INNER JOIN
`catalog_product_entity` AS `product_entity_table` ON links.product_id =
product_entity_table.entity_id WHERE (((`e`.`required_options` != 1) OR
(`e`.`required_options` IS NULL))) AND (at_status.value IN(1, 2)) AND
(links.product_id = 687) AND (`e`.`entity_id` != '687') ORDER BY
`position` ASC

What caused that error, Thanks in advance.

Edit:

I have used that sql statements to clear the DB from products, customers and categories prior to deploy


texts:
I need SCP for magento 1.9.2.4 like this https://github.com/organicinternet/magento-configurable-simple

Please can you help me?


texts: I got issue regarding memory limit, I have changed php.ini files. still got same error?

texts:
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

{"messages":{"error":[{"code":500,"message":"Fatal Error: 'Allowed
memory size of 134217728 bytes exhausted (tried to allocate 4096
bytes)' in
'/home/a1pro/public_html/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php'
on line 121"

when i checked during command then it shows 128M only. but i have changed with php_value memory_limit 2048M .


texts: Magento 2 - change url-key for a category for all store views programatically

texts: How can I programatically change url-key for a category for all store views?


texts:
I have created custom Factory class for my custom model class. Of course basically you can instantiate it by calling $this->objectManager->create(Someobject::class);. But, ObjectManage has also secoind argument array $arguments. Is it possible to do something like $this->objectManager->create(SomeClass::class, $data);, where $data is an array in order to populate object with some data during its creation? SomeClass inherits from Magento\Framework\DataObject.

When I tried call with second argument like above, object is generated, but with no data. After creation I can call $object->setData($data) and it works, but using second argument of ObjectManager seems to be much more elegant. Can anyone tell how to do it?


texts: Magento2 Paypal Express checkout stop auto create invoice

texts:
i have setup Paypal Express Checkout in my magento2 website,
when user place the order, invoice is automatically create,
i want to stop that auto create invoice using custom code

how i can do that?


texts: Is there a way to export/import attributes, categories, and products in Magento?

texts:
I would like to export data for:

attributes
attribute sets
categories
simple products
configurable products

I don't want to use the admin GUI... I'm lookng for a command line solution.

Perhaps one way to do it is to know which tables I need to manually export and then import?

I've also recently discovered the wonderful n98-magerun tool. Perhaps there is a custom module for this to allow me to accomplish this?


texts: How do you add translation for extensions in Magento2?

texts:
I installed IWC's One Page Checkout (OPC) extension and even though it works properly, we just can't translate it into Spanish.

We have a language pack es_MX.csv (Spanish/Mexico) with translations for the whole site. Everything pulls the right string except for the OPC.

Should I create an additional CSV file? Where?


texts: Unable to get newly inserted Product's Id using After Plugin for Catalog Product save controller method

texts:
I have created interceptor for catalog product controller's save action

<type name="Magento\Catalog\Controller\Adminhtml\Product\Save">
    <plugin name="ricky_catalog_save_product"
            type="Ricky\Catalog\Plugin\Product\Save" sortOrder="10"
    />
</type>

My plugin class is below

namespace Ricky\Catalog\Plugin\Product;

class Save {
     public function afterExecute(
          \Magento\Catalog\Controller\Adminhtml\Product\Save $subject,
           $result)
    {
         $productId = $subject->productId; // This is not working
         /**
         echo $result->getProduct->getId(); die("prodid");
         echo $subject->getProduct->getId(); die("prodid");
         Both throw exception: Undefined property $getProduct
        **/

         /** $productId is provided in excute method in Save class
            in Magento\Catalog\Controller\Adminhtml\Product\Save **/
    }
}

For some reasons I have to use Plugin (Interceptor Design Pattern), I know I can get newly created prouduct id by using observer for catalog_product_save_after event. But please provide solution for plugins.

I am asking this after visiting This Solution

Thanks for help :)


texts: Magento can't register new customer + customer can't change password after upgrade to 1.9.3.1

texts:
I've upgraded from Magento CE 1.6.2.0 to CE 1.9.3.1, but did so with the following command: ditto -V path/to/magento/1.9.3.1/ path/to/magento/1.6.2.0.

After putting this live, there was an error when going to System -> Configuration (blank page), as described in this article section. So after reading this I found out there were a lot more files that didn't get deleted, so I deleted and replaced the src/code/core and src/lib directories to be on par with the actual upgraded version.

Everything so far works as expected, but now I can't create a customer, or change the password for an existing customer (both from customer account as in backend). It fails somewhere with handling the password. I've been able to trace it back to the createPostAction and editPostAction within src/app/code/core/Mage/Customer/controllers/AccountController.php, but I'm stuck there.

Has anyone come across this before and how can I fix this? Many thanks to whoever can help me.

Note: I now this is not the normal way of handling upgrades, but this was the only way availeble for me (Magento Connect is disabled). I've also checked the template file, as described here


texts: How to add price_info to GET - v1/products or GET - v1/products/:sku

texts:
GET - v1/product-renders-info endpoint provides product details along with price_info (contains final_price, max_price, special_price and etc...) as a below mentioned response

"price_info": {
        "final_price": 809.1,
        "max_price": 809.1,
        "max_regular_price": 809.1,
        "minimal_regular_price": 809.1,
        "special_price": null,
        "minimal_price": 809.1,
        "regular_price": 899,
        "formatted_prices": {
          "final_price": "$809.10",
          "max_price": "$809.10",
          "minimal_price": "$809.10",
          "max_regular_price": "$809.10",
          "minimal_regular_price": null,
          "special_price": null,
          "regular_price": "$899.00"
        }

How to add the same into  GET - v1/products or GET - v1/products/:sku end points?


texts: Magento 2 - How to disable the wishlist for guests only?

texts:
On anywhere it may appear including product grids and pdp's.

I want to disable the Wishlist module including hiding all links in the menues (i.e. Dashboard, Top Navigation).

Is there an easy way to do this?

I know that i can do this: php bin/magento module:disable Magento_Wishlist
to disable it completely but that's not what i'm looking for.


texts: get product collection and subcategory id using category id magento 2

texts:
I want to get product collection and subcategory using category id.

I am trying

$category =  2;
    $product = $this->productFactory->create()->getCollection();
    $product->addAttributeToSelect('*');
    $product->addAttributeToFilter('category_ids',$category);

But it gives error like this

  Column not found: 1054 Champ 'e.category_ids' inconnu dans where clause,...

And how to get subcategory id from category id?


texts: Magento2 - How to see if configurable products has simple products attached

texts:
We are using magento 2.1.9ce

And most of our products are made with an api.
There was a bug in this api connection, which disconnected simple products from the configurable product.

So now there are configurable products in our backend without any childs.
But we have 15K products in total, so to check them manually isn't an option.

Is there a way to see which configurable products don't have a simple product connected?


texts: How to add radio button to set default value for Customizable Options in Magento2

texts: How to add radio button to set default value for product custom options (Customizable Options) in Magento2 Admin grid


texts:
Hi i have this error in Log File

The Extension Free Besteller is deleted

Can anybody help me please

2016-09-19T20:22:26+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Ungültiger Blocktyp: Mage_Freebestsellerssidebar_Block_Widget' in /home/blueb/public_html/app/Mage.php:595
Stack trace:
#0 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Ung\xC3\xBCltiger Blo...')
#1 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('freebestsellers...', Array)
#2 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('freebestsellers...', '5fea1f5d240b1ce...')
#3 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('freebestsellers...', '5fea1f5d240b1ce...')
#4 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/blueb/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/blueb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/blueb/public_html/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/blueb/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#9 /home/blueb/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#10 /home/blueb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /home/blueb/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /home/blueb/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/blueb/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/blueb/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home/blueb/public_html/index.php(83): Mage::run('', 'store')
#16 {main}


texts: How can i do copy of my selected sku products to other category in same root category using CSV?

texts:
My root category is Default Category under my root category there are 10 nos of sub category, how can i do copy of my selected sku products to other category in same root category using CSV.

Note : The selected sku is mingled with various category. I have created category name  Offer, i need various categories of products copied to "Offer" category


texts:
In our store we can sell 5-pack or single of our products.

We do charge more for single product compared to 5-pack. Reason is that the product is delivered to us in terms of 5-packs. So single product is basically an 5-pack / 5.

Today we use tier-prices set to 5 and above. Meaning that if a customer order a 5-pack they will get a discount for the 5 products in cart.

However, this should not apply for single products outside of the 5-pack range. So lets say I order seven units. I should pay 1 * 5-pack prices and 2 * single prices. If I order 10 units I would instead be charged the 5-pack prices for all units.

I think standard tier-price can not solve this for me and I have tried to find a good extension to handle this.


texts:
Is there any way to select only product Id for compare items in collection Like:

$compare = Mage::helper('catalog/product_compare')->getItemCollection();
$compare_product = array();
$compareList = '';
foreach ($compare as $product) {
    $compareList .= $product->getId();
    $compare_product[] = $product->getId();
}

instead:

$compare = Mage::helper('catalog/product_compare')->getItemCollection()->addAttributeToSelect('product_id');


texts: Magento 2 install and ship 3rd party (php)library with custom module

texts:
I am creating a magento 2 module that requires a 3rd party library, but have no idea how do I install it with the module.

This is my module's composer.json file.

{
    "name": "namespace/name",
    "description":"N/A",
    "require": {
        "vandor/library": "^2.2"
    },
    "type": "magento2-module",
    "version":"1.0.0",
    "license":[
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "psr-4": { "Namespace\\Modulename\\": "" },
        "files": [ "registration.php" ]
    }
}

When I run the command composer install, it installed the library in the module's directory.

I need to install it in the <magento_root>/[lib or vendor (whichever is correct)], please note that I need to upload this extension to the marketplace.


texts: Google Analytics not working in 1.7.0.2 (community edition)

texts:
currently in that version of magento community, have done the "enable" button and entered account, no dice. Read on forum about a fix, not working. Im not getting ANY evidence to appear in my page source. I am not a proficcient in these languages, please be as elementary in ur response as possible, it wont hurt my feelings lol :) Heres the code for the 2 relevant (i think) files:
googleanalytics.xml

<layout version=\"0.1.0\">

<!--
Default layout, loads most of the pages
-->

<default>
    <!-- Mage_GoogleAnalytics -->
    <reference name="before_body_end">
        <block type="googleanalytics/ga" name="google_analytics" as="google_analytics" template="googleanalytics/ga.phtml" />
    </reference>
</default>

ga.phtml

<?php

?>
<?php if (!Mage::helper('core/cookie')->isUserNotAllowSaveCookie()): ?>
<?php $accountId = Mage::getStoreConfig(Mage_GoogleAnalytics_Helper_Data::XML_PATH_ACCOUNT) ?>
<!-- BEGIN GOOGLE ANALYTICS CODEs -->
<script type="text/javascript">
//<![CDATA[
    var _gaq = _gaq || [];
    <?php echo $this->_getPageTrackingCode($accountId) ?>
    <?php echo $this->_getOrdersTrackingCode() ?>

    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

//]]>
</script>
<!-- END GOOGLE ANALYTICS CODE -->
<?php endif; ?>


texts: Adding an extra image gallery into magento add/edit product area

texts:
I am wanting to add an extra image gallery into Magento so we can upload fabric images for only certain products if possible?

Basically we are wanting to add an extra tab into the add/edit product area which allows you to upload images of fabric options. Would this be possible?

I have tried fabric swatch plugins but these don't show an extra gallery, these show on the selectable option its-self.


texts: How to allow orders for out-of-stock products without enable Backorder in Admin?

texts:
We want to be able to take orders for products that are "out of stock" in Magento without enabled backorders in System > Config > Inventory.

How can custom code? Any other suggestions on that ?

Thanks a lot !


texts: My Theme - whishlist Page Design Not Working

texts: i have installed the whole package but now i have 1 little problem. the pages: my account, whishlist, cart, checkout and login does not have the same themelayout. the still have the standard magento layout. can you please tell me how to change ?


texts: Configurable products don't respond to price.phtml changes

texts:
According to the block hints, configurable products display the price typically from app/design/frontend/base/default/template/catalog/product/price.phtml.

However, we are making changes to that file in our custom package/theme and only the simple products respond. The configurables continue to show the old version of price.phtml in our theme. Even if we disable that file with an underscore, it continues to display the old price.phtml in our theme. The only way it goes away at all is if we remove price.phtml from the base folder too. Then we get no price at all.

Will someone please explain how to control the price display in configurable products using a custom file?


texts: how do it Configure user level security whether only registered customers order the product.?

texts: i have develop localhost website but i have not Configure user level security whether only registered customers can make an order on product for in my site.


texts: how to display the address fields in the registration form

texts:
I was looking but I can not find a solution that will work.

During registration on Magento 2.1.11, I would like to display the following additional fields:

address (required)
mobile phone (required)
company name (required)
company's registration number (required)

It is a B2B wholesale site, so I only sell for companies. I would like all these fields to be required during registration.

maybe any have a solution?


texts: Magento 2: Transportbuilder sending empty mails

texts:
I'm trying to use the transportbuilder to send an custom email in my module.
I succeed in sending an email, but the body is always empty.

This is my email_templates.xml (placed in view/frontend/email/)

    <?xml version="1.0"?>

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
        <template id="empty_email_template" label="Empty Template" file="empty.html" type="text" module="Xaiamedia_SyncProducts" area="frontend"/>
    </config>

And this is my mail function:

    $emailTemplateVariables = array();
    $emailTempVariables['ucdata'] = 'dummy';

    $sendToEmail = 'email@gmail.com';

    $postObject = new \Magento\Framework\DataObject();
    $postObject->setData($emailTempVariables);

    $sender = array('email' => "info@mywebsite.nl", 'name' => 'Mywebsite');

    $transport = $this->_transportBuilder->setTemplateIdentifier('empty_email_template')
    ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID])
    ->setTemplateVars(['data' => $postObject])
    ->setFrom($sender)
    ->addTo($sendToEmail)
    ->setReplyTo($sender['email'])
    ->getTransport();
    $bla = $transport->sendMessage();

And this is my template:

    De volgende producten zijn verwijderd door Lightmakers:

    {{trans "Ucdata: %ucData" ucData=$data.ucdata}}

The email is fully blank (no static template content aswell), but I don't get any error messages while sending.
Is there a way to debug this situation?


texts:
Is there anyway that I can update the media_gallery attribute of a product? I do have an array of data for media_gallery like this...

{
    ["sku"] => string(4) "8676"
    ["media_gallery"] => object(stdClass)#67 (2) {
      ["images"] => array(1) {
        [0] => object(stdClass)#35 (8) {
          ["value_id"] => string(4) "2270"
          ["file"] => string(38) "/d/e/den-lille-bibel-bog-og-plakat.jpg"
          ["label"] => string(0) ""
          ["position"] => string(1) "1"
          ["disabled"] => string(1) "0"
          ["label_default"] => string(0) ""
          ["position_default"] => string(1) "1"
          ["disabled_default"] => string(1) "0"
        }
      }
      ["values"] => array(0) {
      }
    }
    ["image"] => string(12) "no_selection"
    ["small_image"] => string(12) "no_selection"
    ["thumbnail"] => string(12) "no_selection"
  }

is there any $product->setMediaGallery(); method ?


texts: Categrory URL Rewrite Not Working After Upgrading To Magento 2.3.1 from Magento 2.3.0

texts:
After upgrading to Magento 2.3.1 from 2.3.0, Category URL Rewrite don't seem to be working.

After the update, now when I am creating a new product, the URL that's being generated is something like this: http://example.com/catalog/product/view/id/3708/s/test-product-1/. The correct format should have been http://example.com/mobile-spare-parts/test-product-1/.

My settings are as follows:

Configuration >> General >> Web >> Search Engine Optimization >> Use Web Server Rewrites: Yes
Configuration >> Catalog >> Search Engine Optimization >> Use Categories Path for Product URLs: Yes
Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Categories: No
Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Products: Yes

What seems to be working though is, after creating a product, if I go and change the category to some other category, & save the product again, the URL re-write seems to be happening.

Again if I revert back to the original category, even now the URL re-write seems to be working with Clean URL being generated.


texts: How to upgrade friendsofphp/php-cs-fixer?

texts:
Server: CentOS 7
PHP: 7.3.13
Litespeed: Enabled
Magento: 2.3.3

I was attempting to run some updates via composer when I received an error about my PHP being too high.

I attempted to upgrade php-cs-fixer from v2.13.3 to v2.16.1 (which supports PHP73) - however, this failed for the same message as below (under Problem 1). Server was downgraded to PHP7.2 but when running the command

composer update friendsofphp/php-cs-fixer

I received a message that there was nothing to update??

I ran the following command to see if it was a composer error

composer diagnose

which pointed out I was running composer 1.8.9 (which has now been updated to 1.9.1).

Any idea how I can upgrade php-cs-fixer to allow me to run composer commands on PHP7.3


texts:
No matter what facebook pixel code we add or no matter what extension we add the fb pixel will not pull through the correct data on the configurable products

we have tried many extensions and fb pixels but we always get the price from the cheapest child product and only get parent sku not the child sku


texts: Magento 2 - Web Upgrade Fails on Component Dependency Checks

texts:
I have a Magento 2 site on version 2.1.8 and I am attempting to upgrade to 2.2.5 with the Web Setup Wizard. When I run the readiness check, it fails on Component Dependency.

My composer.json file contents is below. It's identical to a fresh composer.json from the source archive.

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.8",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"require": {
    "magento/product-community-edition": "2.1.8",
    "composer/composer": "@alpha"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.4.0",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0",
    "sebastian/phpcpd": "2.0.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    }
],
"extra": {
    "magento-force": "override"
    }
}

Check Component Dependency
We found conflicting component dependencies. Hide detail
For additional assistance, see component dependency help.

I checked the component dependency help page, but since I get no reference to WHICH dependency is the problem, I'm not sure where to look. Not sure what I should do. All attempts at upgrading have failed thus far.

Is there a step I'm missing? Do I need to update the current file set using composer with update and install? I cleaned the composer cache for good measure but no change from that either.

Any help would be appreciated.