texts: Magento 1.9.2 - how to set checkbox in admin grid checked by default

texts:
Is there any way to make all checkboxes checked in particular column in admin grid.

I want checkboxes checked by default in "skip" column.
Here is a code for this column:

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

    $this->addColumn('skip', array(
        'header'     => Mage::helper('importexport')->__('Skip'),
        'type'       => 'checkbox',
        'name'       => 'skip',
        'field_name' => Mage_ImportExport_Model_Export::FILTER_ELEMENT_SKIP . '[]',
        'filter'     => false,
        'sortable'   => false,
        'align'      => 'center',
        'index'      => 'attribute_id'
    ));

   //other columns here

    if ($this->hasOperation()) {
        $operation = $this->getOperation();
        $skipAttr = $operation->getSkipAttr();
        if ($skipAttr) {
            $this->getColumn('skip')
                ->setData('values', $skipAttr);
        }
        $filter = $operation->getExportFilter();
        if ($filter) {
            $this->getColumn('filter')
                ->setData('values', $filter);
        }
    }

    return $this;
}


texts: How to print array contents in log file?

texts: How to print array contents into a log file in magento CE 1.7 without iterating through a loop?


texts: Blog Pro extension gives 404 error on 2nd page of Archive

texts:
This is probably a rare problem but it's for MagPleasure's Blog Pro extension and they aren't around any more to offer support.

The problem was on archive pages if you clicked on the "Older" link to take you to the second page it would give a 404 error. Other 2nd pages worked (category, search, etc).


texts: magento2 - undefined index title in User role page

texts:
Why do I get this when I try to create a new User role in Magento2:

  Exception #0 (Exception): Notice: Undefined index: title in C:\xampp\htdocs\magento2x_2\app\code\Magento\Integration\Helper\Data.php on line 24

I have all the titles defined in my custom xml file.
var/ cache, generation cleared.
run setup upgrade.

Help required!


texts: M2: How can I override Magento\Framework\View\Element\Html\Link\Current?

texts:
I used Plugin for this, But my plugin is not working.
Below is my code.
di.xml

<type name="Magento\Framework\View\Element\Html\Link\Current">
    <plugin name="Current" type="CP\Coreoverride\Plugin\Current" />
</type>

Current.php

<?php
namespace CP\Coreoverride\Plugin;

class Current{

  protected function _toHtml()
  {
    echo "fdsfds"; die;
  }

}

Anyone can look into please.


texts:
My main issue is : In the category I'm not retieving any products when I call $currentCateg->getProductCollection()
After some digging I found the request used to retrieve these products in the method _applyProductLimitations from Magento\Catalog\Model\ResourceModel\Product\Collection
Notice this is working with old stores, but I'm trying to make it work for a bunch of new stores.
Anyway, this was the request :
SELECT `e`.*, `cat_index`.`position` AS `cat_index_position` FROM `catalog_product_entity` AS `e`
    INNER JOIN `catalog_category_product_index_store15` AS `cat_index` ON cat_index.product_id=e.entity_id
    AND cat_index.store_id=15 AND cat_index.category_id=115'

From there I went to check the table catalog_category_product_index_store15 in this table I noticed there isn't any mention to the category_id = 115
This category is one of my new stores category as you can see

Of course, I already did a index:reindex
Then I noticed I do not have any table catalog_category_flat_store_15. So I guess this is the real reason of why I can't find my category id in the catalog_category_product_index_store15
Any ideas ?


texts: how to pass a variable from one phtml to another?

texts:
I have two phtml which have its own unique block file. I need to pass variable from one phtml to another.

PHTML 1

<?php
$option_id = 20;
?>

<a href="<?php echo $baseUrl ?>/brandsmodules/index/demo" >

PHTML 2

In this page is where I need to get the variable. I don't want to pass variables in URL as parameter due to security concerns.


texts:
I'm looking for a way to create 'product ranges' for specific customers.
It should either be able to limit the products a certain customer can view and order, or add a custom sorting to the order in which the products are displayed in a category. But per customer. Any suggestions?


texts: Maximum of 2 Thumbnails on a configurable product page

texts:
I am using Magento CE 2.1. I have a configurable product with 3 pictures. I can only get 2 thumbnails on the screen under the main picture. The thumbnail pictures (under the main product image) will alternate between all three color pictures. I cannot get all three pictures on the screen at the same time. How can I fix this?

Thanks


texts: How to pass a variable from a.phtml Block to its parent block?

texts:
I've created a child block and inside there is a counter.
Now I need that value from the counter but the output is/shall before my block.

Is that possible?

It shall look like this:

html
 output the value of my counter
 childBlock (inside that block I will retrieve my counter value)


texts: Magento 2 Caching data from the database

texts:
I'm currently looking at caching parts of the database. For example, I have a JSON string in a column called object_data. Now I don't want to connect to the database every time I fetch that data, instead, I would like to cache it.

I didn't really find anything related to this question on the web so I don't know if this is even an option or if it's a good practice. Could anyone tell me if this is possible and hook me up with an example.

Thanks in advance!


texts:
I put a mini-login block in the left column of home. But when I am trying to log-in from there, it takes me to the log-in page with no errors.

In my search, I have seen that we should use a variable form_key, but I am not sure about where should I place it.

Here is my code i put in \app\design\frontend\base\default\layout\customer.xml

<customer_logged_out>
    <reference name="left">
        <block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
     ...
</customer_logged_out>


texts:
Magento with 2.4.2 changed the location of the root and the index.php by set everything inside the pub folder.
This causes a 404 problem in the case magento is not in the docroot and I cannot resolve it.
I currently have this situation:
docroot website.com
public_html. (docroot)
    |
     -- store
          |
           -- pub

I tried to change .htaccess on public_html and on store but all possible combinations and solutions do not seem to bring results
Magento return always 404 error whatever url i request
website.com/store/ or website.com/store/category ecc..
Static files return also 404 but if i create manually a static file (example print.css o style.css), this file is loaded correctly.
It would seem that the rewrite rules work for files but not for magento (and its rules for generating static files in developer mode)
Using "index.php" in the url like this
website.com/store/index.php/category/
allows magento to load the page (but static files not)
How to fix this?


texts:
I just need to find the categories of item in cart.
For that I've used:

class MageCustom_ShippingFilter_Model_Shipping extends Mage_Shipping_Model_Shipping
{
    public function collectCarrierRates($carrierCode, $request)
    {
        if (!$this->_checkCarrierAvailability($carrierCode, $request)) {
            return $this;
        }
        return parent::collectCarrierRates($carrierCode, $request);
    }

    protected function _checkCarrierAvailability($carrierCode, $request = null)
    {
        Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
        $i=0;
        $productName = array();
        foreach ($cart as $item) {
            $productName[$i] = $item->getProduct()->getCategoryIds()[0];
            $i++;
        }

        $cat = array(94,97);
        $cartCat = productName;
        $result=array_diff($cat,$cartCat);
        if(count($result)==0){
            //echo count($result);
            if($carrierCode == "southeastern"){
                return true;
            }
        }

        if(count($result)>=1){
            //echo count($result);
            if($carrierCode == "fedex"){
                return true;
        }
    }

}

But it's iterating as per cart item.
Like if I add product in cart with same category 10 item, then it's iterating 10 times.

Here you can see many arrays coming.
I'm getting category name, but I do not know why is coming several times.


texts: Magento2 : custom rate for shipping method

texts:
In magento2 - I want to use custom price for one of my shipping method per quote.

I want to show custom amount for only current quote. how to do it. Like there is a shipping method. "CUSTOM FLAT RATE"

Now if

customer A is buying 2 product i want to show amount shipment method amount for him $22,

customer A is buying 2 product i want to show amount shipment method amount for him $35,

customer A is buying 2 product i want to show amount shippment method amount for him $87

I want to update it pragmatically on checkout page before load shipping method for current quote only.


texts: Magento 2 add free product to cart programmatically on place order But dont display free product in cart

texts: in Magento 2 how to add free product to cart programmatically on place order But don't display free product in cart


texts: Magento 2 unable to save product weight programatically

texts:
I am creating a new product programmatically. The product is being created but it is not saving the values for length,width,height and weight.

        $newProduct = $this->productFactory->create();
        $newProduct->setName($productDetails["name"]);
        $newProduct->setSku($productDetails["sku"]);

        $sourceItemInterface = $this->sourceItemInterfaceFactory->create();

        $sourceItemInterface->setSku($productDetails['sku']);
        $sourceItemInterface->setQuantity($productDetails['qty']);
        $sourceItemInterface->setStatus(1);
        $sourceItemInterface->setSourceCode($userSource);
        $this->sourceItemsSaveInterface->execute([$sourceItemInterface]);

        $newProduct->setStockData(
                            ['use_config_manage_stock' => 0,
                            'manage_stock' => 1,
                            'is_in_stock' => 1,
                            'qty' => $productDetails["qty"]
                        ]);
        $newProduct->setAttributeSetId(4);
        $newProduct->setStatus(1);
        $newProduct->setVisibility(4);
        $product = $newProduct->save();

        $product->setCustomAttribute('ts_dimensions_length',$productDetails["length"]);
        $product->setCustomAttribute('ts_dimensions_width',$productDetails["width"]);
        $product->setCustomAttribute('ts_dimensions_height',$productDetails["height"]);
        $product->setWeight($productDetails["weight"]);

        $product->save();


texts: how to change root category to subcategory

texts:
I have a very silly issue here. what I did is I created categories and subcategories and all the main categories are now root categories ... but they should be under my main root category which is default category.

I have no idea that how to change the hierarchy of all these categories and set them as a subcategory of the default category which is set as root category in the store.

due to this, I can not see any category in the navigation.

I am using Magento 1.8 (so no drag and drop functionality I guess :( )


texts:
Is it possible to add a check for shipping address on frontend?

I am not sure or know much about VAT and I am planning to put a check before customer purchase any goods from the website.

I have a website which is based in Europe and I can only ship the product to Australia and Italy and the website store which is Germany.

When a customer fill the details in the billing address automatically added into shipping address by default.

I want to allow users to ship the product to Australia and Italy and Germany only if they
provide VAT for them country.

Basically VAT should match with the country.

Any help or advice I could take a look at


texts: Magento 2 : What tables should be created to make product price Store-view wise? [ Multi Storeview Pricing ]

texts:
I want to create functionality like product prices can be set at the store-view level for that I've added one more option as Storeview in a configuration for

  Stores > Config > Catalog > Catalog > Price

It's already done the price is changing properly store-view wise in the backend also showing on frontend but on a listing page, price filter in layered navigation is not showing products according to the price I've set store view wise.

At first, I thought to create a custom field store_id in

  catalog_product_index_price

since it's default Magento table, it's not a good idea to change the default tables so I want to create a separate table like

  catalog_product_index_price_store

There are a number of tables in the database related to catalog_product_index_price.

catalog_product_index_price
catalog_product_index_price_bundle_idx
catalog_product_index_price_bundle_opt_idx
catalog_product_index_price_bundle_opt_tmp
catalog_product_index_price_bundle_sel_idx
catalog_product_index_price_bundle_sel_tmp
catalog_product_index_price_bundle_tmp
catalog_product_index_price_cfg_opt_agr_idx
catalog_product_index_price_cfg_opt_agr_tmp
catalog_product_index_price_cfg_opt_idx
catalog_product_index_price_cfg_opt_tmp
catalog_product_index_price_downlod_idx
catalog_product_index_price_downlod_tmp
catalog_product_index_price_final_idx
catalog_product_index_price_final_tmp
catalog_product_index_price_idx
catalog_product_index_price_opt_agr_idx
catalog_product_index_price_opt_agr_tmp
catalog_product_index_price_opt_idx
catalog_product_index_price_opt_tmp
catalog_product_index_price_replica
catalog_product_index_price_tmp
catalog_product_index_tier_price
catalog_product_index_website

  The problem is, I don't know which tables would be affected by this
  and which are the exact tables, I have to create that affected tables as
  well. Should I update all the tables related to price or are there any other tables than listed above?

Some tables are creating during indexing, so how can I create tables during indexing?


texts:
Since now i see a problem on a dashboard from our client, it is showing the amount of orders but not the total value (price) of the orders... That is stopped since i think 2 weeks.

The total value stays on 5.949,90 but only the amount of orders is counting not the value of it.


texts: Add to cart is not working in configurable product in magento 1.9.1.0

texts:
Please specify the product's option(s).

for simple product addtocart is working properly.
Thankyou in advance.


texts: Using Magento for quotes in physical store

texts:
How would it be possible to use Magento for quotes made in store by the store staff? You can create a new order in admin, but it reduces the stock right away when you make an order and that is not what we want. For quotes it's not needed to reduce the stock, because customer does not necessarily make a purchase.

We need to be able to make an offer quickly and print it to PDF with product images in the printed PDF.


texts:
I have a scenario in which i need to call addto.phtml from addtocart.phtml. I used the following code in media.phtml and it worked but its not working for addtocart.

<?php echo $this->getParentBlock()->getHtml('addto'); ?>

Am I doing something wrong or do I need to make some changed in catalog.xml ?


texts: How to change Rs to Indian rupee symbol (Devanagari letter "र") at product display page?

texts:
I am changing Rs to Indian rupee sign (Devanagari letter "र") . using below code

<?php echo $this->getPriceHtml($_product, true, '-new'); ?>

replace it by

<?php
$string = $this->getPriceHtml($_product, true, '-new');
$string = str_replace("Rs", "<img src='http://www.myiris.com/insurance/images/rupee_icon.gif'>", $string);
echo $string;
?>

Problem: In some products there are custom options like color or model etc where rupee sign is not changing.

I changed rupee sign by changing in below file.    public_html/app/design/frontend/base/default/template/catalog/product/price.phtml

For custom option products where should i changed code? filename

for reference

http://www.ultimatespares.com/rizoma-grips-legend.html -- without sign
http://www.ultimatespares.com/brands/k-n/k-n-kn-303-oil-filter.html --with sign


texts: New Magento theme wont load theme styles

texts:
I have installed a new Magento install on my local machine and have given it a new theme. I updated the theme in the Config section in the admin, but the CSS for the theme is not being loaded. Instead, the css files in skin/frontend/base are being loaded. How can I change the folder from base to ?

The path to my theme is skin/frontend/. The only thing I have changed in the admin has been at System -> Conficuration -> Design and under the Package dropdown, I changed default to


texts: Add a custom new language package Magento 2.1.3

texts:
I'm trying to create a new language package for Magento 2.1.3.

I've been following this guide but without success.

I tried the following steps without success:

1) Collect phrases from your module

magento i18n:collect-phrases -o "/var/www/html/magento2/sv_SE.csv" -m

2) Translate the words and phrases
I translated some words to Swedish.

3) Create the language package

magento i18n:pack /var/www/html/magento2/sv_SE.csv -d sv_SE

4) Create a directory for the language package

I created a directory named i18n, DSE and another directory named sv_se.

/var/www/html/magento2/app/i18n/DSE/sv_se

5) In the above directory, I added the following:

composer.json
registration.php
language.xml

My composer.json

{
    "name": "dse/language-sv_se",
    "description": "Swedish language",
    "version": "100.0.2",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/framework": "100.0.*"
    },
    "type": "magento2-language",
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

My registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::LANGUAGE,
    'magento_sv_se',
    __DIR__
);

My language.xml

<?xml version="1.0"?>
<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Languag$
    sv_SE
    <vendor>dse</vendor>
    <package>sv_se</package>
</language>

What am I missing?

The phrases that I entered in sv_SE.csv before I ran magento i18n:pack are not showing up on my site.

All commands ran with success (as far as I can tell).


texts: Login to user account fails first try, works second try

texts:
On my production site, if you try to login to the account from the sign in page it fails the first try. There is no error message, it just empties the form and doesn’t log you in. If you try a second time it works and logs the user in.

Now, if you try to login from the onepage checkout it empties your cart and doesn’t log you in and redirects you to the empty cart page. If you then add an item to your cart and go back to checkout and login again it logs you in and merges your cart with the item(s) it previously cleared out.

If you log out and try to log back in it works on subsequent log in attempts. It's just the very first time trying to login to an account that fails with no visual indication as to why.

I've verified that the form key is on the page for both login locations. My cookie domain is set as .MyUrlHere.com

Running Magento v. 1.9.0.1


texts: How to display custom notification or alert message on checkout pages?

texts:
Since the Covid mutation has arrived at our warehouse location, I'm looking for a way to use a text banner or something similar to inform people about possible unscheduled delays in shipping orders.
For this, I am looking for the easiest way to display custom alert messages on the checkout and checkout/cart pages. Do you have any good ideas?


texts: How to update quantity of all products in cart with REST API

texts:
For updating a single cart item I am using a request like this:

PUT    /V1/carts/:cartId/items/:itemId

with body

{
    "cart_item": {
    "sku": "Some SKU here",
    "qty": 7,
    ...
    "quote_id": "1"
    }
}

However, this approach has several problems
 - It doesn't work as a single request for updating multiple cart items, which is my main problem.
 - It always adds quantity, but doesn't override, as mentioned here

I want to update the whole information once from client side, because it may not be convenient to request an update for each clicked button. Neither it's a good idea to send multiple updates at the end.

I'm new to this forum and Magento, please sorry for wrong formatting, and thank you for your time.


texts: Continue Button on 'Billing Information' on checkout page not work in magento 1.9

texts: I am using magento 1.9. All work fine on desktop but when i place order through mobile and as non-login user then Continue button not work and not move to next step. In work is shows session expired in save billing address please help if any one know. Thanks


texts: Remove price from select option in magento 2.3.2

texts:
I have Commented these lines:

  if (optionPriceDiff !== 0) {
                                  options[i].label = options[i].label + ' ' + priceUtils.formatPrice(
                                      optionPriceDiff,
                                      this.options.priceFormat,
                                      true);
                              }

But it's not effecting.


texts:
I have a testimonials page, where my customer has added a .gif image. The image is not getting loaded on the frontend , hence alternate image text getting displayed.
This is the code

<img src="../../../js/tiny_mce/plugins/emotions/img/smiley-kiss.gif" alt="Kiss" title="Kiss" border="0">

On inspecting when I hover on this code, it shows Could not load image
How to resolve this?


texts: How can I get custom attribute value of an associated product in a grouped product?

texts: How can I get the custom attribute value of an associated product in a grouped product in .phtml file in Magento 2.3.5?


texts: magento 1.9 Catalog search result showing encoded result in other languages other than english

texts:
I have a multi-store website with different languages

when I search the terms from other languages it gives an incorrect result with special characters.

and the URL is like this

catalogsearch/result?q=%25E9%2585%258D%25E4%25BB%25B6

does anyone know the solution for this?


texts: Calling the welcome message in different template?

texts:
Is it possible to call the default welcome message when user is logged in ("Welcome, customer.fullname") in a different .phtml?
I'd need this message in my Magento_Customer/templates/account/customer.phtml


texts:
Have an issue here and would love to hear an advice. Simple example:
I type snake top in the search bar and it shows me all products that contain top and snake in the title or description. I, however, want it to show me only snake tops, nothing else.

Is there a way to configure that in Magento without an extension? Was looking at Klevu but if there is a way to do it in Magento manually, would rather go for that.
Thanks!


texts: Is it safe to delete old magento version files?

texts:
In my magento root folder under var/package/ I can see all the xml files for all the magento versions I've ever had. Here's an example of what I'm seeing.

Cm_RedisSession-1.8.0.0.xml 1.17 KB 0755
Cm_RedisSession-1.9.2.0.xml 1.17 KB 0644
Cm_RedisSession-1.9.2.1.xml 1.17 KB 0644
Cm_RedisSession-1.9.2.2.xml 1.17 KB 0644

Is it safe to delete these files up to my current version 1.9.2.2?


texts: How data is inserted in catalogsearch_fulltext table?

texts:
I have two stores. The catalogsearch_fulltext table contains values for a product available in both stores as shown in screen shot below.

The values inserted in name column are

SURGICAL STEEL DOUBLE JEWELED NAVEL BANANA SURGICAL STEEL DOUBLE SWAROVSKI CRYSTAL JEWELED NAVEL BANANA SURGICAL STEEL DOUBLE SWAROVSKI CRYSTALS JEWELED NAVEL BANANA

and

BNDJ SURGICAL STEEL DOUBLE SWAROVSKI CRYSTALS JEWELED NAVEL BANANA SURGICAL STEEL DOUBLE JEWELED NAVEL BANANA

for store_id 3 and 1 respectively. The data_index values are same.

This is a group product. All product attribute values are same. There is only difference in number of associated products.

On what basis the values for column 'name' are inserted in table catalogsearch_fulltext?

EDIT:

I have made associated products same and re-indexed data but still 'name' column values are different.


texts: Magento 2 email generated by cron not loading config vars

texts:
So I have set up a config to store the environment-specific URL path to images and it works fine to load a header image for emails driven by API calls but for a cron generated email it does not.
Not finding anything on this on the web or in the docs.
Thanks,.


texts: Backup fuction gone in admin after sucessful upgrade to 1.9.4?

texts:
After successful upgrade to Magento 1.9.4 - the system backup function in completely gone in back-end admin. Beats me?

Thanks,


texts: Set page title after loadLayout and renderLayout

texts:
I need to set some tags(title, description) after i render a layout.
I know how to set the titles via layout files:

<reference name="head">
 <action method="setTitle" translate="title"><title>Your Title</title></action>
</reference>

or via code by accessing head block element and calling setTitle('your title') method on it

$this->getLayout()->getBlock('head')->setTitle('your title');

but i need the titles to be dynamically fetched from an item from a collection.

If i go with the controller approach i will be loading the same element twice since i need to load the product to get the fields to set them as Title and Description and again in the block to show it in the product page.

Is it wise to save it with Mage::register('variable', 'value');?
Should i create the entire layout programatically and assign the data with $this->getLayout()->getBlock('your.block.name.in.the.layout')->assign('data', $data);?


texts: The element 'product.info.options' already has a child with alias 'text' - Magento 2.2.0

texts:
After data migration (1.9.1 CE - 2.2.0 CE) I got the below error when I click add to cart button in magento 2

  we can't add this item to your shopping cart right now

I did research about this but found no clue...

log says :

  The element 'product.info.options' already has a child with alias 'text' {"exception":"[object] (Magento\Framework\Exception\LocalizedException(code: 0): The element 'product.info.options' already has a child with alias 'text' at /var/www/html/lib/internal/Magento/Framework/Data/Structure.php:611)"} []


texts: Change order status via PHP with Magento2

texts:
Using Magento ver. 2.0.7
I am trying to use this code to change order to the status of "Processing", but i get an error, i think i am missing some prerequisite to call, but i can't figure it out.

  [25-Oct-2016 13:11:30 America/Detroit] PHP Fatal error:  Class 'Magento\Framework\App\ObjectManager' not found in /chroot/home/testplat/test.platinait.ca/html/pub/orderstatus.php on line 4

<?php

$orderId = 000000193;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('\Magento\Sales\Model\Order')
                           ->load($orderId);

$order->setState("processing")->setStatus("processing");

$order->save();


texts: Force magento to use full product path in all pages

texts:
I need to force magento to use only full product paths with categories and subcategories. Can i somehow achieve it? I enabled "Use category paths to product urls", reindexed everything but no result.. From home page or any category i can enter only product with url: website.com/product.html

Am i doing something wrong here?


texts: Cannot create static Cms block from backend

texts:
Whenever I try to create a new static block from the backend, I always get the notice

  "Could  not save block, sorry something went wrong".

Checking logs I found this exception of the violation of an integrity constraint

> main.CRITICAL: Exception message: SQLSTATE[23000]: Integrity
> constraint violation: 1452 Cannot add or update a child row: a foreign
> key constraint fails (`my_db`.`cms_block_store`, CONSTRAINT
> `CMS_BLOCK_STORE_BLOCK_ID_CMS_BLOCK_BLOCK_ID` FOREIGN KEY (`block_id`)
> REFERENCES `cms_block_live` (`block_id`) ON DELETE CASCADE), query
> was: INSERT INTO `cms_block_store` (`block_id`,`store_id`) VALUES (?,
> ?)

I've tried to delete orphans without a block_id in both tables, but it seems a strange behaviour.

In another Magento version I have installed, the table cms_block_live is not present, there's only the table cms_block, which is present also in this version, which is 2.1.10. Should cms_block_live be present?

I found there is a similar Magento bug in this verison, that has been fixed in 2.2 and 2.3 versions, but before upgrading, I would like to know if there is anybody else experiencing this issue.


texts: __Model_::_construct() not allowing method calls

texts:
I'm having a curious problem in model's _construct function.

When the model is instantiated I would like to call a method to pull and save an access key from a database into a class property so it is immediately available, so I'm calling the method from within the _construct():

private $active_key

protected function _construct()
{
    $this->_init('foo/foo');
    $this->active_key = $this->getActiveKey();
}

The Method

public function getActiveKey()
{
    return $this->getCollection()
        ->addFieldToSelect('foo_key')
        ->addFieldToFilter(
            'foo_timestamp',
            array('gt'=>$this->threshold)
        )
        ->getFirstItem()
        ->getFooKey();
}

If I call getActiveKey() from a controller, all's fine and it returns the correct data. Using $this->getActiveKey() in the _construct, however, prompts a "No Data Received" error from our servers when instantiating the model class.   Is there some sort of restriction against methods in the model _construct that I'm unaware of?

I know I could just chain the methods I require in the controller that will use the model, but I would like to understand why this is not working like I think it should.


texts:
I am attempting step 3.i of the Upgrading to and Verifying Magento Community Edition 1.8 and Enterprise Edition 1.13 - Part 1 instructions. The site is functioning, but when I attempt to run the URL migration script, I see this:

[root@quantumpostcards store2]# php -f shell/url_migration_to_1_13.php - 2
[INFO]: Initialization...

Fatal error: Call to a member function init() on a non-object in shell/url_migration_to_1_13.php on line 74

I have cleared the cache and set var/ to 777 based on previous comments, but these had no impact. Any Suggestion?

FWIW I can successfully run shell/indexer.php (php -f shell/indexer.php -- --reindexall).


texts:
Magento 2.3.2 CE
I am looking for a way of creating a list of non-selling products. I.E. products that are 'in-stock' but haven't moved for, say, a month (or date range). Reports seem to be based on actually selling at least one thing, but I need it to start at zero. Does anyone know if there is anything integral to Magento that can do this, or an extension/module maybe?
We are a plant nursery and are looking at what to stock/not stock next year based on what has sold/not sold this year.
TIA


texts: Magento 2: I'm unable to save new products

texts:
My website is running on Magento 2.
I have migrated data from Magento 1.x to version 2.1 using UB data migration tool.
Now I am planning to upgrade Magento 2.1.3. After Magento upgrade

I am unable to save new products. It shows error:

  SQLSTATE[HY000]: General error: 1449 The user specified as a definer
  ('rb_magento2'@'localhost') does not exist, query was: INSERT INTO
  catalog_product_entity (entity_id, attribute_set_id, type_id,
  sku, has_options, required_options) VALUES (?, ?, ?, ?, ?, ?)

The user rb_magento2 is or live Magento database but I have created a copy of Magento on a new server with the different username.


texts: Magento 2 - Get product list price and multiply by 2

texts:
I have the following Cart Price Rule:

How I can display the rule in product list page? I need to have something like:

1 + 1 = 78$

Basically I need to get the base price *2 - 10.

Thank you


texts: cms pages and block is not loading in backend

texts: CMS pages and blocks won't load in the backend. It keeps loading and loading without not showing any pages or blocks. I reindex, compile, clear cache... But nothing changed. Any help would be much appreciated.


texts: Site was hacked and placed a linked on the bottom of my website

texts:
Recently my website was hacked and at the bottom of the page there is a link that gets redirected to spam. I looked at every file that is associated with my site as well as used the built in debug path hint and I am unable to find this link. When looking through all my code especially my footer.phtml this random link is not present. When I view the debug for the frontend the path hint stops before this link.

I have notice is on the footer on every page as well as the admin page. Has anyone encounter this before. My website is http://www.supermarketneeds.com and you can see a link under the footer called Mature.

Thank you


texts: Magento2.1 Helper; what's the difference between "extend" and "use" of AbstractHelper

texts:
In Magento 2 we have to create a lot of data for ourselves using helper-modules. In the Vendor/Example/Helper/Data.php I often see either of these two at the top of the file:

use Magento\Framework\App\Helper\AbstractHelper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper

And sometimes both:
use Magento\Framework\App\Helper\AbstractHelper;
class Data extends AbstractHelper

And I'm wondering, is there any difference to either use or extend the AbstractHelper? Is there a right or wrong?

A simple answer I found is this:

  You can use multiple traits, you can't extend multiple classes.

Does this translate into you either extend to add new stuff to it, and use it to get existing data? And again, is there an upside or downside in using either in Magento?


texts: How to destroy specific backend session programmatically

texts:
I am doing login and logout to magento backend via API.
I am enable to create the session and pass to API response to my UI part.
But when I log out from UI , the API should destroy that backend session
How can I achieve this?

I am trying to do with below code.

$adminSession = Mage::getSingleton('admin/session');
$adminSession->unsetAll();
$adminSession->getCookie()->delete($adminSession->getSessionName());

any one can help quickly will force my progress
Thanks.


texts: Magento 2.3 - Salable Quantity turning off

texts:
Is there a way to set work around the Reservations in 2.3 ?

Currently,

  "The quantity of the product decrease only after shipping is
  completed"

. We do oversell over the weekend as qty doesn't go down on order placement. Its brilliant but when you go back on Monday and see -45 on products you have a problem.

Can we switch so quantity depreciates on order placement?


texts: How to change the title of contacts page in coding in magento?

texts: I have done a website in magento. In that website, I have contact page. I have inserted the keywords,description in the contact page But when I am giving the title, it is not showing in the website. Why is it like that ?


texts: Customer Address custom attribute not showing front end in Magento 2

texts:
I am trying to create and save the Customer Address custom attribute for these I have created the module and it's successfully created and showing backend (adminhtml), But frontend not showing.

My code is:

<?php

namespace Learning\CA\Setup;

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

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{

    /**
     * @var CustomerSetupFactory
     */
    protected $customerSetupFactory;

    /**
     * @var AttributeSetFactory
     */
    private $attributeSetFactory;

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

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

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

        if (version_compare($context->getVersion(), '2.1.0', '<')) {

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

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

            $customerSetup->addAttribute('customer_address', 'dummy_nav_customer_id', [
                'type' => 'varchar',
                'label' => 'Nav Customer ID',
                'input' => 'text',
                'required' => false,
                'visible' => true,
                'user_defined' => true,
                'sort_order' => 1000,
                'position' => 1000,
                'system' => 0,
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'dummy_nav_customer_id')
                ->addData([
                    'attribute_set_id' => $attributeSetId,
                    'attribute_group_id' => $attributeGroupId,
                    'used_in_forms' => ['adminhtml_customer_address', 'customer_address_edit', 'customer_register_address'],
                ]);
            $attribute->save();
        }

        $setup->endSetup();
    }

}

And it's showing while debugging my code, after saving customer address see below pic.

Why it's not showing frontend? My code is wrong?


texts: Configurable Product with associated individual product doesn't show

texts: When I change the configurable options in the drop down menu, it changes only price. But it doesn't change such as sku, description, additional info of associated simple products. It was worked well before. I think it happens after I upgraded magento into 1.9.2.2 . please help me about this issue. please check this link and change the configurable option ( size ), then you can see only change price. But it doesn't show actual simple's details such as sku, description. https://www.bestdeals4ever.com/double-wind-spinner.html thanks


texts:
I have upgraded Magento version from 2.1.4 to 2.2.1. Upgrade was successfull but once after Upgrade when i open homepage it's showing following error,

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'body': Character content other than whitespace is not allowed because the content type is 'element-only'.
Line: 408

Can anyone please suggest how to figure out this issue.


texts: Get subscribers total for particular queue

texts:
How to get subscribers total for a queue?

Somebody help me


texts: How to exclude configurable product sku from catalog rule

texts:
I am trying to exclude some list of sku's from catalog price rule, in this list simple and configurable product sku's are there.
Successfully excluding for simple products but not working for configurable sku's.


texts: Magento 2. Less to CSS. Very slow building process. How to improve?

texts:
Currently magento2/grunt is very slow in transforming less to css (with a few locales it can take up to a minute to rebuild everything.

Any tips how to improve development speed?


texts: Magento 2.2.8 - sitemap.xml contains "pub" DIR in the URL, It should be without "pub" directory in the URL

texts:
Preconditions

  app/etc/env.php

'directories' => [ 'document_root_is_pub' => true ],

'MAGE_MODE' => 'production',

document_root_is_pub is true
MAGE_MODE is have production value

  sitemap.xml

Filename : sitemap.xml
Path : /media/

  Admin => Stores => Configuration => General => Web:

Base Urls => Base URL for User Media Files =>{{unsecure_base_url}}media/
Base URLs (Secure) => Secure Base URL for User Media Files => {{secure_base_url}}media/

  But while generating the sitemap.xml via cron

Expected result

sitemap.xml index urls to sitemap should be
https://magento-site/media/sitemap-1-1.xml

Actual result

sitemap.xml urls look like
https://magento-site/pub/media/sitemap-1-1.xml

  NOTE : When sitemap is generated from admin panel sitemap contains the proper urls, But somehow with cron it comes wrong url (contains pub in the url)

Most likely reason (Might be) But not in my case

  Sometime problem happens when running the sitemap generation through
  bin/magento cron:run from outside of the Magento directory.

e.g our magento code is in /var/www/src, if I run php src/bin/magento cron:run from /var/www the urls will contain src as part of the
baseurl.
Running from the magento directory, e.g php bin/magento cron:run from
/var/www/src, works as expected.
But my cron is generating from /var/www/src
And Running from ADMIN UI - Site generate will also works as
expected.

  Any solution or advise will be really helpful.


texts: I'm having a hard time QAing Magento full-page caching. How can I test from the frontend that a page is utilizing FPC?


texts: Magento 2: Onepage checkout shipping address ZIP Code custom data validation. Zip codes from the databse

texts:
I am absolutely new with Magento. Have basic knowledge with custom modules and front-end layout updates.

I need to insert a custom validation for the ZIP Code in my checkout page (One-page checkout). Zip codes are from database, there is a custom admin module for the business administrator who can put insert/update ZIP codes with it's respective Country Code (Both are separate fields).

I have tried to customize "/view/frontend/layout/checkout_index_index.xml" with no luck. Most of the examples are with JS solution. Some of them with event observer and custom modules but not clear enough. Unable to figure it out how to validate the data with the inserted "ZIP Code" and selected Country.

Any support or proper direction will much appreciated.


texts: Magento 1.9.1 - Unable to edit (click) URL Rewrite fields in backend

texts:
I'm trying to edit (or redirect) some category menus to other categories. Example, I have two sub-categories called "Compression Wear" (id 60 - /compression-wear.html) AND "Compression Wear" (id 67 - /compression-wear-secondary.html). Each are under different parent categories, same store. I'd like to only add products to id 60 and have them appear in id 67 also. I figured the best route was to redirect id 60 to id 67 using URL Rewrite Management.

Problem:

After clicking to edit a URL Rewrite, I'm unable to click to edit any field except for "Request Path". I made a custom URL Rewrite but that did not redirect. I was able to click and edit the fields when I made my own Custom Rewrite, however, when and if I try to edit it after saving, same problem, I'm unable to click and edit fields. Screenshot and Code below.

The code on the right for one of the paths I was trying to click and edit says, title="Target Path" disabled="disabled" if I change that to disabled="enabled" nothing happens, but if I remove it completely, I'm able to cursor over the text field and edit things. This of course is just in Chrome Inspector, so no real changes are being saved.

What I've Tried:

I've tried reindexing, recaching, restarting apache, logging in Firefox, Chrome, IE - all to no resolution. I do believe at one point I was able to redirect just fine without this issue. I'm unaware if this is caused by an extension/module installed in Magento (or to go about finding if it is).

Please help

Is it possibly something to change on my server end, as I've been unable to find anything related to my problem, except for one "not really answered or followed-up" post. Post found here.


texts: E_COMPILE_ERROR when enabling Magento compilation

texts:
I'm trying to enable compilation on Magento via the control panel and while compilation is enabled the main page fails to display properly and I find that index.php has repeatedly raised the following error in logs:

E_COMPILE_ERROR: require_once(): Failed opening required 'ConfigFileManagerModel.php' (include_path='/var/www/vhosts/<domain_name_redacted>/httpdocs/includes/src:.:')

The site returns to normal immediately after disabling compilation but I'd really like to have the performance benefits. Does anyone know how to fix this?


texts: Flat rate shipping without applying exchange rate

texts:
We have a magento setup with multiple sites/stores, each with a different currency.

It is setup to use a global base currency so that product prices will be updated as the exchange rates change.

HOWEVER, since the flat rate shipping is applied on the website level, we would like the shipping prices to be as we set them in the local currency of the site/store, as opposed to the global base currency.

For example, base currency is USD
Shipping in Canada is $3.99 CAD, but shows up as $5.25 CAD (basically assuming the $3.99 is in USD and multiplying by the exchange rate).  Short of updating the shipping prices whenever the currency changes (which is unreasonable), what can be suggested to keep the shipping price in the local store currency and not the global currency?


texts: How to start accepting Bitcoin as a payment method on Magento?

texts:
We would like to expand our payment options and start offering Bitcoin payments for our products.

Given the price of Bitcoin is very volatile (it goes UP and DOWN a lot) - how would we determine how much the customer needs to send and how to set that up technically on Magento?


texts: Captcha not visible Create Account or Login, but is visible Forgot Password

texts:
I'm trying to get Captcha to work on "Create an Account" without any luck.
The capchta image is not visible nor is "Please type the letters below" text or text box.

If you try to create an account you get the error "Incorrect CAPTCHA"

The strange thing is it works perfectly on the "Forgot Your Password" form.


texts: Can't create category with id with REST WEBAPI (categoryrepositoryV1/POST)

texts:
when i try to call the REST API categoryrepositoryV1 with SOAPUI to create a category (With POST) it says my id doesn't exist.

{
  "category": {
    "id" : "16",
    "parentId": 13,
    "name": "Regulateur A127 en ligne, compact",
    "isActive": true,
    "position": 1,
    "level": 3,
    "include_in_menu": true,
    "path" : "1/3/13/16"
    }
}

but if I try without and ID , it creates my category.

When I checked where is the error when i try to create my category with and ID , it is because of line 87/88 in vendor/magento/catalog/model/categoryRepository.

it's : $category = $this->get($category->getId(), $storeId);

I comment it in my screenshot.

Why does he try to get the id of the category i'am creating ?

How can I make it work ?

Thanks for your help.


texts:
I want to show the last articles from my blog (wordpress) in my store (magento 2.3.5). I`m looking for a RSS Feed reader, but after googling I only find solutions for Magento 1. Anyone knows any solution form Magento 2?
Thank you in advance.


texts: It is possible to run the reindex of a single catalog price rule in a module controller for example?

texts: The idea behind it, is some how keep a track of what's catalog rules are indexed. If i can run the index of a single rule in a module i can then save some logs and also do them in blocks of 10 for example


texts: Frontend layout not working after upgrading to Magento 2.1

texts:
My Magento 2.08 was working fine, but due to new features introduced in Magento 2.1 and curiosity of knowing how upgrade works in Magento 2, I tried to upgrade my Magento to latest stable version of Magento, i.e. Magento 2.1.

Everything went fine and I found admin panel functionality was working fine after upgrade.

But frontend is not working anymore now.

I inspected the problem and found that styles-m.css and styles-l.css are showing 404 not found error in page source.

Also below is my system.log file content:

[2016-08-10 04:09:15] main.CRITICAL:
Compilation from source:
frontend/Srm/cookbook/en_US/css/styles-l.less
Unable to get content for 'frontend/Srm/cookbook/en_US/Magento_Theme/css/source/module/_collapsible_navigation.less' [] []
[2016-08-10 04:09:15] main.CRITICAL:
Compilation from source:
frontend/Srm/cookbook/en_US/css/styles-m.less
Unable to get content for 'frontend/Srm/cookbook/en_US/Magento_Theme/css/source/module/_collapsible_navigation.less' [] []

I also tried to run grunt exec:<themename>, but I got below message:

A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.

Please help me to resolve this problem.

Thanks in advance


texts:
Unable to place COD for guest user getting below error in console. Once reload the page the error goes away and everything works fine

No third party module or custom template. Simply giving error.
Plugin to check if COD is available for the post code.

public function afterIsAvailable(\Magento\Payment\Model\Method\AbstractMethod $subject, $result)
{
    $postcode = $this->_checkoutSession->getQuote()->getShippingAddress()->getPostcode();
    if (condition) {
                return $result;
    }

    return false;
}


texts: breadcrumb question about rendering html

texts:
At first let me admit, I'm not a programmer, although I have a lot of expierence in tweaking small bits of php here and there.
Also I'm not very familiar with Magento's ways of coding.

I have this client who wants to add the manufacturer's brandname to the breadcrumb with a link to the brandname in it. We're using layered navigation that's where I got the link from.

The output I get is Home / Categoryname / productname of

Brandname

Here in which the html doesn't get rendered because of the breadcrumbs block being echoed with the function toHtml().

Is there anyway I can bypass this?

Here's my code: (the code was put in the view.phtml of product)

//Get current category url
$current_category = Mage::registry('current_category')->getUrl();

//Get brandname
$brandname = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('manufacturer');

//Strip .html and add the stuff from the layered navigation to it
$brandurl = str_replace(".html", "/l/". strtolower($brandname) .".html", $current_category);
$brandnamemurl = "of " . $brandname . "";

//breadcrumb stuff
$breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');
$breadcrumbs->addCrumb('manufacturer', array('label'=>$brandnamemurl, 'title'=>$brandname));
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();

http://pastebin.com/csueRX6T


texts: how to append media url in magento customer edit page admin custom field in magento 2.3

texts:
customer_form.xml
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">

    <fieldset name="customer">        <field name="id_proof" sortOrder="400" formElement="input" class="My\Module\Ui\Component\Form\Field\LinkProvider">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">customer</item>
                    <item name="elementTmpl" xsi:type="string">My_Module/link.html</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                Id Proof

            </settings>
        </field>
</fieldset>
</form>

My\Module\Ui\Component\Form\Field\LinkProvider.php
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\UrlInterface;

class LinkProvider extends \Magento\Ui\Component\Form\Field
{
    /**
     * @var StoreManagerInterface
     */
    public $storeManager;    /**
     * LinkProvider constructor.
     * @param ContextInterface $context
     * @param UiComponentFactory $uiComponentFactory
     * @param StoreManagerInterface $storeManager
     * @param array $components
     * @param array $data
     */
    public function __construct (
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        StoreManagerInterface $storeManager,
        $components = [], array $data = [])
    {
        parent::__construct($context, $uiComponentFactory, $components, $data);
        $this->storeManager = $storeManager;
    }    /**
     * Prepare component configuration
     *
     * @return void
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function prepare()
    {
    parent::prepare();
    $this->_data['value']="custom_value";
    $this->setData('id_proof','new_value');
    }

link.html
Click Here

here i want to append
Media url with => value
how i change  the value of this ?
(Now just     /Files/NewFile.pdf)    --- here i want append media url here
how i can do this?
(Ver . Magento 2.3.5)


texts: Sort attribute values in admin with your own attributes

texts:
We have created a attribute with a lot of values and we don't want to use the position field.
When we create a new product all of the options in the select component are random we want to arrange those by sorting by ABC.

How can we fix this in the admin in Magento

Update: august 25, 2014
Nobody?


texts: Why visitor id is null in table report_viewed_product_index Magento 2.2.6

texts: Whenever i access product page from front-end as guest user then visitor_id is saving null in report_viewed_product_index table?


texts: I am trying to edit order email template to fit my needs. However I am not able to edit the last part where the order items, quantity and price are. I want to have something like what you are seeing on the image below. As you I want Item name only on the left, followed by SKU number, 3rd column quantity and last column item/s price. I've tried to make direct edits to items.phtml but I am not able to understand how to have this result.


texts: free shipping option already set but other charged shopping option are also displayed

texts:
i have set a shopping cart rule when the sub total exceed certain amount, there will be a free shipping option let customer choose, but the strange is the charged shipping option is also displayed

Anyone know what's wrong with that?


texts: How to search shipping address in Magento 1

texts:
I want search shipping address by customer name, company, city or postcode. Please help me

This my code, but it get double, it gte shipping and billing address, i want get only shipping address.

$addressCollection = Mage::getModel('sales/order_address')->getCollection();
$addressCollection->getSelect()->where("lastname like '%$customerName%' and company like '%$customerCompany%' and city like '%$customerCity%' and postcode like '%$customerCode%'");
var_dump($addressCollection->getData());exit;

UPDATE

I follow answer and it show error

Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lastname like '%Nhân%' and company like '%%' and city like '%%' and postcode li' at line 1, query was: SELECT `main_table`.* FROM `sales_flat_order_address` AS `main_table` WHERE (address_type = 'shipping' lastname like '%Nhân%' and company like '%%' and city like '%%' and postcode like '%%')";


texts: Url redirection is not working properly if we open the some product url

texts:
I have a product URL

  http://dev.com/abcd/xyz.html

(This is the English store URL). I have a different URL for different stores. For the above product, I have different URL in Deutsch store.

  http://dev.com/abcd/pqr.html

So if I open the English store URL for the first time it will redirect correctly. if I switch the store from English to Deutsch and close the browser, and again enter English store URL it will not redirect correctly it is going to 404. (English URL is not converting to Deutsch).How to fix this issue?


texts:
We have made some changes to the design of our website.
Everything works great and looks good. However, if you haven't deleted your cache since the change, some thing don't look so great.

Is there a way to tell the customers browser not the use their cache?
Maybe something in .htaccess? or somewere else? default magento?

Hope you can help me out.


texts: How to stop programmatically product inventory decrease when is selected custom shipping method

texts: Need to stop product stock quantity decrease when is selected custom shipping method. In this case product will be shipped by alternative warehouse. Is there any way? Thank you in advance


texts: magento module enabled but results as inactive

texts:
i have enabled module from admin panel but in source code it is going to else part, what may be the reason?

Please help on this...


texts: Magento 2 : Getting Internal Server Error While Deleting Multiple Users

texts: I am using Magento 2.1.7. From admin panel, getting an internal server error on deleting the more than 50 customer from mass action.


texts: Debug Mage_Index_Model_Event stock related memory problem during checkout

texts:
This project has around 150k skus with stock management enabled, most of them are configurable products... We've been live with 256Mb php memory_limit, but during last weeks we're having allowed memory errors during checkout

Errors come when last available unit of a configurable child is sold (stock status change)

We've fixed this raising memory_limit to 512Mb, but I'd like to see which data is consuming so much memory, the concrete piece of code firing the error is the setNewData() line in mergePreviousData() method, in Mage_Index_Model_Event class

public function mergePreviousData($data)
{
    if (!empty($data['event_id'])) {
        $this->setId($data['event_id']);
        $this->setCreatedAt($data['created_at']);
    }

    if (!empty($data['new_data'])) {
        $previousNewData = unserialize($data['new_data']);
        $currentNewData  = $this->getNewData(false);
        $currentNewData = $this->_mergeNewDataRecursive($previousNewData, $currentNewData);
        $this->setNewData(serialize($currentNewData));
    }
    return $this;
}

I've checked $currentNewData in DB, and it is a very simple and light object, with just some properties... so I suspect problem must be with that _mergeNewDataRecursive() previous line, but I am not sure which part of the checkout request is consuming so much memory

Any ideas?


texts: How can I display the product short description in the related product template?

texts: I need to display the related product short description in a magento 1.9 store.  What do I need to add to the template->catalog->product->list->related.phtml file?


texts: Magento code or extension to add coupon code in last step of onestep checkout

texts:
We are looking for a clean, easy, close to core solution  to add coupon code in last step of onestep checkout

Question: What's the best extension or code could we could use to accomplish this

What it should do is

show the discount box in the very last step
on enter or on submit, it should reload the last step in onestep checkout (na ajax necessary)
On the server compute the discount & show the last step again in onestep checkout

many thanks in advance

FYI
When a client goes directly to checkout (instead of via cart) - they are never confronted with a box to enter a coupon code. We have just launched a national ad - and the below article is true ... it is almost ridiculous how many emails we receive on this matter: "Hi, we would like to buy but cannot find where to enter the coupon code"

http://www.commandc.com/2014/01/29/top-reasons-for-cart-abandonment-2-difficulty-with-promo-codes/


texts: Magento 2.1 Product url shows two times suffix

texts:
My store product url shows two times .html as suffix like below
http://localhost/m2migration/canape-chesterfield-assise-capitonnee-cuir.html.html

This issue arised after ubertheme migration.

Can you please tell me how can i resolve it?

I am using Magento 2.1

Thanks in advance


texts: Trying to add an icon to a CMS static block inline with a banner

texts:
I'm trying to add an icon inline with the banner text in a CMS static block. So far, all I've been able to do is use relative positioning to move it there on the page, but that is easily affected by my rwd theme's page styles:

This is the banner text

I've tried using span tags and giving the  tag a display:inline style:

This is the banner text

But in the admin editor (which I have to use, because the text needs to be editable by a copywriter), the span is dropped around the  tag.

This is the banner text

Any idea what to try next?


texts: how to display product sku in admin grid

texts: everyone, I want to display product SKU in admin grid I am following this link Product sku in magento2 now I want to know what to write in the index.xml to pass SKU in admin grid


texts: magento 2 api. create product with multiple colours and sizes with different image and stock for each variant

texts:
I am a noob to the Magento ecosystem. I have read the documentation for the Magento 2 api and understand that I have to create a configurable product but I am not understanding the flow for creating a configurable product with multiple colours and sizes with individual images and stock levels. I have integrated with Woo and I created a product with an image with one api call and then the variants with stock levels and images with another api call. Magento looks like a more complex beast but any help would be appreciated. Thank you in adavance.

Kind Regards,
Jason.


texts:
I am getting below error in console, when i try to edit product in admin

 Uncaught TypeError: data.some is not a function

Referred below link and used that didn't solve my issue.

Uncaught TypeError: data.some is not a function

Can anyone help me on this please?


texts: Call a function in an observer from another observer

texts:
I'm trying to call a function in an observer from another observer. I have a custom product type I've created called assembly. In my assembly config.xml

    <catalog_product_prepare_save>
        <observers>
            <assembly_observer>
                <class>assembly/observer</class>
                <method>prepareProductSave</method>
            </assembly_observer>
        </observers>
    </catalog_product_prepare_save>

and in the model/observer.php

class MyNamespace_Assembly_Model_Observer
{
    public function MyFunction($observer)
    {
    }
}

How do I call MyFunction($observer) from an observer I have in another module?


texts: Separete billing addresses from payment methods

texts:
I have a issue in magento 2 checkout.

I want to show billing addresses from payment methods in other container, separate of payment methods. Now the billing addresses are in payment method container, and i don't need this.

How can i handle it?

Please check this screenshot http://i.imgur.com/KPNFE5j.png for more info.


texts:
I need to add a cash discount for a payment method (called "Vorkasse" in German - advance payment is the word in English I guess). The total cart value (excluding shipping costs) should have a discount of 2%.

I found this already here: how to add fee to order totals in magento2

But it is a fixed rate for all payment methods...


texts: Magento 2: Add after/before positioning in pre existing xml block/container

texts:
I want to position few blocks and containers in the checkout page. I am using a custom theme and create a checkout_cart_index.xml file.The file contents are

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">Shopping Cart</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="cart.summary" htmlClass="cart-summary clearafter">
            <block class="Magento\Framework\View\Element\Template" name="cartbutton" template="Magento_Theme::cartbutton.phtml"/>
            <move element="checkout.cart.shipping" before="-"/>
        </referenceContainer>
        <referenceBlock name="checkout.cart.summary.title" remove="true"/>

    </body>
</page>

But its not working. How can I do it?


texts: Delete unwanted files from magento folder

texts: I’ve installed magento edition version 1.9.2.0 and added a custom attribute pdf(text field) and adding pdf names for each product using this attribute and manually adding pdf file in the media/PDF folder.Now i want to delete the unwanted pdf files(not in database) .please suggest any option for this.


texts: Magento 1.9 refresh shipping methods on saveBilling (OPC) from an observer

texts:
In the One Page Checkout the saveBilling step creates the Shipping Methods insert on the fly from the controller response (when billing[use_for_shipping] is selected), which you can retrieve from an observer like so:

/* @var $response Mage_Core_Controller_Response_Http */
$response = $observer->getControllerAction()->getResponse();
$responseArray = Mage::helper('core')->jsonDecode($response->getBody());

However, the problem I've got is that the shipping value is a table rate based on the value of the shopping cart (e.g. free shipping on orders over £25) and there's a membership pricelist. This is all fine when someone logs into an account but it causes a problem with the guest checkout.

A field was added to the Billing section for customers to enter their membership number. When the saveBilling step is called the observer verifies the membership and recalculates the quote totals ($quote->setTotalsCollectedFlag(false)->collectTotals();) ... this all works fine.

However it's possible that someone over the free shipping threshold drops below it when their pricelist is switched as some items are cheaper but the Shipping Methods insert has already been generated from the controller so the wrong shipping price is displayed.

I can work around it by removing prices from the template or manipulating the form - but those are both hacks. I'd like to be able to recreate the shipping methods response from the controller using the updated quote. Any ideas?


texts:
How can I confirm that all Cron Jobs working fine?

As synchronization of accounts stopped suddenly. All things were working fine earlier.

 Show processlist  result


texts: Issue on customer listing in the backend admin panel

texts:
I want to see my customers listing in admin backend but here is this type of error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.customer_grid_flat' doesn't exist, query was: SELECT COUNT(*) FROM customer_grid_flat AS main_table

And one thing more, When I run this command "php bin/magento setup:upgrade" for deploy the content then I am getting this error in the command prompt
"SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed, query was: CREATE TABLE IF NOT EXISTS customer_grid_flat (
entity_id int UNSIGNED NOT NULL COMMENT 'Entity ID' ,
name text NULL COMMENT 'Name' ,
email varchar(255) NULL COMMENT 'Email' ,
group_id int NULL COMMENT 'Group_id' ,
created_at timestamp NULL default NULL COMMENT 'Created_at' ,
website_id int NULL COMMENT 'Website_id' ,
confirmation varchar(255) NULL COMMENT 'Confirmation' ,
created_in text NULL COMMENT 'Created_in' ,
dob date NULL COMMENT 'Dob' ,
gender int NULL COMMENT 'Gender' ,
taxvat varchar(255) NULL COMMENT 'Taxvat' ,
lock_expires timestamp NULL default NULL COMMENT 'Lock_expires' ,
aw_ca_business_name varchar(255) NULL COMMENT 'Aw_ca_business_name' ,
aw_ca_business_addr text NULL COMMENT 'Aw_ca_business_addr' ,
aw_ca_reseller_permitt varchar(255) NULL COMMENT 'Aw_ca_reseller_permitt' ,
aw_ca_contactnumber varchar(255) NULL COMMENT 'Aw_ca_contactnumber' ,
is_approved varchar(255) NULL COMMENT 'Is_approved' ,
shipping_full text NULL COMMENT 'Shipping_full' ,
billing_full text NULL COMMENT 'Billing_full' ,
billing_firstname varchar(255) NULL COMMENT 'Billing_firstname' ,
billing_lastname varchar(255) NULL COMMENT 'Billing_lastname' ,
billing_telephone varchar(255) NULL COMMENT 'Billing_telephone' ,
billing_postcode varchar(255) NULL COMMENT 'Billing_postcode' ,
billing_country_id varchar(255) NULL COMMENT 'Billing_country_id' ,
billing_region varchar(255) NULL COMMENT 'Billing_region' ,
billing_street varchar(255) NULL COMMENT 'Billing_street' ,
billing_city varchar(255) NULL COMMENT 'Billing_city' ,
billing_fax varchar(255) NULL COMMENT 'Billing_fax' ,
billing_vat_id varchar(255) NULL COMMENT 'Billing_vat_id' ,
billing_company varchar(255) NULL COMMENT 'Billing_company' ,
PRIMARY KEY (entity_id),
INDEX CUSTOMER_GRID_FLAT_GROUP_ID (group_id),
INDEX CUSTOMER_GRID_FLAT_CREATED_AT (created_at),
INDEX CUSTOMER_GRID_FLAT_WEBSITE_ID (website_id),
INDEX CUSTOMER_GRID_FLAT_CONFIRMATION (confirmation),
INDEX CUSTOMER_GRID_FLAT_DOB (dob),
INDEX CUSTOMER_GRID_FLAT_GENDER (gender),
INDEX CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID (billing_country_id),
FULLTEXT FTI_00A063FC834DF0A41CC9D8ACF8458ECB (name, email, created_in, taxvat, aw_ca_business_name, aw_ca_business_addr, aw_ca_contactnumber, shipping_full, billing_full, billing_firstname, billing_lastname, billing_telephone, billing_postcode, billing_region, billing_city, billing_fax, billing_company)
) COMMENT='customer_grid_flat' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci
"

For this, I have run php bin/magento indexer: reindex but it still showing this error. What should I do to resolve this error?

Information about My environment

Magento ver. 2.3.1


texts: Question is related to Subscription and Discount Coupon

texts:
Following are the pointers

Subscription Plan functionality for subscription of certain goodies.
After subscription,if customer is purchasing the plan for the first time then coupon code should be generated with thank you /Confirmation mail
The  Customer either can use the coupon or if he does not want to use the coupon then he can share the coupon code with other users via mail/invite (Refer a friend functionality ).
But the third person can not share the same.

Is it possible to perform this for Magento e-commerce site


texts:
I have some strange search terms in my magento admin panel. It looks like 1 waitfor delay '0:0:3' -- or -1' OR 3 512-512-1=0 0 0 1 or '9WQxvY67'='. I've looked into my log and it seems to be a googlebot: 66.249.75.146 - - [05/Sep/2017:00:17:41 +0300] "GET /catalogsearch/result/index/?dimensions=272&q=1+waitfor+delay+%270%3A0%3A3%27+-- HTTP/1.1" 200 15013 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)".
The reverse lookup seems to be crawl-66-249-75-146.googlebot.com but I doubt google use delay statements and this is not the only ip, I have multiple starting with 66.249.x.x. It's not an option to block the class ip, since google use them and some services from google will not work.
Does anyone found a fix to this issue or has more info about it?

Thank you!


texts:
I go to the admin login in Chrome after clearing all cookies and everything.  First thing I check Chrome cookies. I see only one cookie.

Name: adminhtml

Domain: .mysite.com

Path: /

Created: Tuesday, May 24, 2016 at 2:22:00 PM

Expires: Wednesday, May 24, 2017 at 2:22:00 PM (a year from today).

Under Configuration/Advanced/Admin/Security/

Session Lifetime (seconds) =31536000

In phpinfo it says:

session.cookie_lifetime   86400

session.gc_maxlifetime    86400

In index.php I have this:

ini_set('session.cookie_lifetime', '31536000');

ini_set('session.gc_maxlifetime', '31536000');

TIME SETTINGS:

GMT: 18:22:00

Local time: 02:22:00 pm

In .htaccess this: php_value date.timezone 'America/New_York'

New York time: 2:22 PM

Server time America/Phoenix: 11:22 AM

How come it logs me off? Looks like it should at least last one day.

BTW What is the difference in Sessions and Cookies?

Thanks


texts: Custom Front Controller redirects to 404

texts:
I've followed this tutorial from the Magento Wiki, but I get a 404 when accessing my front controller.

After doing research, I found this question facing the same problem and I did all the suggested checks, but to no avail. My compiler and cache are disabled, and to discard hardware-related issues I've cleared my browser's cache and cookies, I've tried in Ubuntu 14.10 with Firefox, Windows 8.1 with all major browsers (including Opera) and iOS 8.1.3 with Safari (both on iPad and iPhone). **(EDIT: I've also cleared the /var/cache/ contents)

My idea is to be able to access company.com/distro and display some information in there. For that, I have the following files for my Company_Distro extension:

/app/etc/modules/Company_Distro.xml

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

/app/code/local/Company/Distro/etc/config.xml

<config>
    <modules>
        <Company_Distro>
            <version>0.1.0</version>
        </Company_Distro>
    </modules>
    <frontend>
        <routers>
            <company_distro>
                <use>standard</use>
                <args>
                    <module>Company_Distro</module>
                    <frontName>distro</frontName>
                </args>
            </company_distro>
        </routers>
    </frontend>
</config>

/app/code/local/Company/Distro/controllers/IndexController.php

class Company_Distro_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction() {
        echo 'Hello';
    }
}

Am I missing something? Am I doing anything wrong? Any help will be greatly appreciated.

Thanks.


texts: Magento Image Cache and defined constant error

texts:
All of a sudden, I'm getting defined constant errors when trying to view cached images.

Example image URL:

http://example.com/media/catalog/product/cache/1/small_image/250x/17f82f742ffe127f42dca9de82fb58b1/a/c/acg55001.jpg

Errors:

Notice: Constant DS already defined in app/Mage.php on line 27
Notice: Constant PS already defined in app/Mage.php on line 28
Notice: Constant BP already defined in app/Mage.php on line 29

From the searching I've done, this usually happens when Magento is being bootstrapped into an application that uses the same constants, or (for some reason) bootstrapped into itself.

However, as far as I know, none of that craziness is happening here. It's pretty vanilla Magento, and yet I'm suddenly getting these errors on some images.

Any ideas? I'm not really sure where to start.

PS: It looks like this URL path is loading get.php and not index.php so this isn't your normal page load. Still, I don't know why this is happening.

Update: Clearing the image cache fixed the issue, but I'd still like to find out why this happened so that I can prevent it.

Update 2: Not only is this reproducable, (just try to load any image that doesn't exist from the image cache,) and did not "go away on it's own," (I had to clear the cache to make it go away,) but I've also figured out the cause. I would appreciate it if moderators weren't so quick to close questions without actually reading the post.

Answer: Version 2.1.0 of the Extendware Full Page Cache module includes it's own autoloader at app/code/local/Varien/Autoload.php This includes the following at the top of the file:

if (defined('DS') === false) define('DS', DIRECTORY_SEPARATOR);
if (defined('PS') === false) define('PS', PATH_SEPARATOR);
if (defined('BP') === false) define('BP', dirname(dirname(dirname(dirname(dirname(__FILE__))))));

However, app/Mage.php include this:

define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);
define('BP', dirname(dirname(__FILE__)));

The problem is that get.php first includes the Varien/Autoload.php (on line 59 in version 1.9.0.1) and then includes app/Mage.php after that (on line 96 in version 1.9.0.1.) The end result is that Mage.php is trying to redefine the constants. This is not an htaccess issue but is just an issue with this module.

The best solution is to have Extendware fix the issue using variables instead of these constants. (Their code is encrypted using Ioncube, so changing it myself isn't an option.)


texts: Magento2 : Is is possible to create invoice order which is placed using bank transfer payment gateway?

texts:
Is it possible to create an invoice & change order status from pending to processing for the order placed using Bank Transfer Payment Gateway?
Also, the customer comment email is not working on the admin side. See the below screenshot.
I know this is an offline payment gateway but Is there any possibility to achieve this.
Thanks in advance..!


texts: How to get device token in order to use Firebase cloud messaging for Push Notifications in Magento 2?

texts: I want to test firebase fcm on my Magento 2 app. But I am not able to get a device token. How will I get the device token in Magento 2?


texts: Is the customer supposed to receive an email when the order is voided?

texts:
I had problems with my customers receiving emails. I'm now testing a fix I found and it seems to be working so far.

I am new to Magento which is why I don't know the answer to this question: is the customer supposed to receive an email when I void the order through the Admin panel?

I looked through the docs and through StackExchange and couldn't find the answer. Maybe I wasn't typing in the right keywords.

Thanks!


texts: Integrity constraint violation: 1022 Can't write; duplicate key in table on reindexing product flat data

texts:
I am new to magento. I am stuck on reindexing issue in magento. When I go to Index management. I see this screen

When I run reindex data from command line "php indexer.php -reindex catalog_product_flat" I got error message as

Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table '#sql-7607_9061'' in /var/www/html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /var/www/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /var/www/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(420): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /var/www/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(341): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /var/www/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(2570): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(816): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1390): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(7)
#10 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
#11 /var/www/html/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
#12 /var/www/html/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#13 /var/www/html/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /var/www/html/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything()
#15 /var/www/html/shell/indexer.php(198): Mage_Shell_Compiler->run()
#16 {main}

Please help me.


texts: How to show the sub category images in Top menu in magento 1.9?

texts:
I want to show sub category images in top menu. i have installed magento 1.9. Here is my site. http://blumelife.co

like in top menu FOOD processor >> meat grinder, i want to show thumbnail image for meat grinder.i already add thumbnail image from admin.

Actually i got one solution but that is not working in 1.9. i follow this one but not helpful for me magento 1.8 menu thumbnail images.


texts: In Magento1.9x how do I get product image from an external URL

texts:
I am Magento newbie and working on a new Project.  Our products supplier has a product image CDN and they authorized us to export the images so that we can upload to our Magento product image files. But these are hundred of images and the export/upload process is quite time consuming.

Is there a way to just show/load the image from a link to the CDN URL so that we can skip the export/upload process?

ivanjaen


texts: My custom module working fine in Magento 2 all version (2.1 to 2.3) expected 2.0 anyone has any idea?

texts:
PHP version 5.6

  Error: "There has been an error processing your request";

I have checked the error log but it not show me any error.

I have also cleared cache using below command:

  php bin/magento cache:flush

  php bin/magento cache:clean

Anyone any idea regarding this?

Note:

$resultPage->setActiveMenu('Module_Name::index');
$resultPage->getConfig()->getTitle()->prepend(__('Module List'))

I noticed this code is not working in Magento 2.0.0 version.


texts: magento api v2 boilerplate generator (creator)

texts:
Is there any online module creator / generator that can create the barebone files for extending magento api v2?

All I have so far is Magento Module Creator which only does api v1.


texts: Show arabic digits for prices in arabic store

texts: I want to show arabic digit for arabic store and english digit for english store.is there any way in magento 2.3


texts:
It's pretty basic, but I can’t find a working example on Stackexchange or google. I want to load a product from a helper or block. I already tried some things like:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$product = $objectManager->create('\Magento\Catalog\Api\Data\ProductInterface');

$product->get('<SKU>');

$product->getName();

This returns nothing.  I also tried loading any available models and API’s, but nothing seems to work with SKU’s.


texts: call search form in custom module Magento 1.9

texts:
I want to show mini search form when i hover on one of the main category (Men Women ... ) at red area, as marked in below image.

This menu is shown using a custom extension.
Is there any way in which i can call default search form  in that custom module.

app/code/community/WP/CustomMenu/etc/config.xml

 <?xml version="1.0"?>
    <layout version="0.1.0">
        <default>

            <block type="custommenu/toggle"></block>
           <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
        </default>
    </layout>

UPdate:

To temporarily solve my issues I did something like below in one of the blocks files app/code/community/WP/CustomMenu/Block

    public function getSearchBlock(  ) {
      $html ='<form id="search_mini_form" class="search-form" action="http://websitename.com/catalogsearch/result/" method="get">
 <input style="padding: 2px 4px 2px 5px;" id="search" type="search" name="q" value="" class="input-text required-entry" maxlength="128" placeholder="Search" autocomplete="off">
    <button type="submit" class="button-search-submit"></button>
</form>';
       return $html;
    }

and then call above function at an appropriate position.
I know above method is not suggested.


texts: Doubts regarding creating Magento Mobile App

texts:
We are planning to create a mobile app for our magento web application. However i'm bit confused on where to start from. We have decided to use the magento REST API Now my doubts are

Are there options to search the products and retrieve the results
using REST    API. As per information on this link i can
understand that it supports managing customers, customer addresses,
sales orders, inventory, and products. There is no information about
searching.   1:
http://devdocs.magento.com/guides/m1x/api/rest/introduction.html
How  to create the checkout process (Onepage checkout). Is there are an option in REST API to create the checkout process

I have followed the steps in this link but when i try to access the API like http://localhost/magento/api/rest/products its returing a 404 error. I have also tried http://localhost/magento/index.php/api/rest/products but it also returing 404 error.


texts: Magento 1.9 How to applied coupon code automatic

texts:
Am using magento 1.9 here am creating a two coupon code those are following

SE50
SE00

This is my query:

I would like to applied SE50 default in checkout/cart page.

how can i do this...?

If it is possible please help me...!


texts: How to override login.phtml file? Is overriding working for template files?

texts:
I tried,

app/design/frontend/Magestore/sample/composer.json

{
"name": "magento/sample-module-theme",
"description": "N/A",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/theme-frontend-luma": "~100.0",
    "magento/framework": "~100.0"
},
"type": "magento2-theme",
"version": "1.0.0",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [ "registration.php" ]
}
}

app/design/frontend/Magestore/sample/registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Magestore/sample',
__DIR__
);

app/design/frontend/Magestore/sample/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Magestore Sample Theme12</title>
<parent>Magento/luma</parent>
</theme>

app/design/frontend/Magestore/sample/Magento_Customer/layout/customer_account_login.xml

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

app/design/frontend/Magestore/sample/Magento_Customer/templates/form/login.phtml

<?php
     echo $welcomeMessage = "Login Page";
 ?>


texts: Need to get additional data in custom shipping method Magento 2?

texts:
How can I get additional data in custom shipping method?

public function collectRates(RateRequest $request)
    {
        if (!$this->getConfigFlag('active')) {
            return false;
        }

        $this->configPhpSigep();
        $metodos = $this->calculaFreteCorreios($request);

        /** @var \Magento\Shipping\Model\Rate\Result $result */
        $result = $this->_rateResultFactory->create();
        $free_sheeping = $request->getFreeShipping();

        foreach ($metodos as $metodo) {

            /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
            $method_colection = $this->_rateMethodFactory->create();

            $method_colection->setCarrier('correiosship');
            $method_colection->setCarrierTitle($metodo['nome']);
            $method_colection->setData('prazo', $metodo['prazo']);

            $method_colection->setMethod('correiosship_' . $metodo['codigo']);
            $method_colection->setMethodTitle($metodo['nome']);
//            $method_colection->setMethodTitle($metodo['nome'] . " Em média " . $metodo['prazo'] . " dia(s)");

            $method_colection->setPrice($metodo['valor_cliente']); // valor pago pelo cliente
            $method_colection->setCost($metodo['valor_lojista']); // valor pago pelo lojista
            $result->append($method_colection);
        }

        return $result;
    }

I set additional data with:

$method_colection->setData('prazo', $metodo['prazo']);

Now I need to render in template custom-method-item-template.html

        <input type="radio"
               class="radio"
               click="element.selectShippingMethod"
               ifnot="method.error_message"
               ko-checked="element.isSelected"
               ko-value="method.carrier_code + '_' + method.method_code"
               attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                        'checked': element.rates().length == 1 || element.isSelected" />

        <each args="element.getRegion('price')" render="" />

                <input type="radio"
                       attr="'value' : method.method_code, 'id': 's_method_' + method.method_code" />

How can I do this?

Thank's


texts: Area code is not set in setup upgrade command installing data

texts:
setup upgrade command throws error while Installing data Area code is not set.
The issue is coming from webkul core module. Anybody faced similar issue?


texts: Confusing events name while listening to observer

texts:
I am working on site where i have to listen for the matching events and run code according to that event.when print the code in observer

print_r($observer->getEvent()->getControllerAction()->getFullActionName());.
I got the events name like ( customer_account_loginPost,customer_account_login,catalog_category_view,checkout_cart_add).
But when i check the event list (on different webistes like magentocommerce,nickysys ) for the events name they are different like(customer_login,add_to_cart_before etc) and also my captured events name are not there

. How can i map these events with each other.I am confuse about the events names.


texts: How to make magento price reindexing and catalog rule apply process faster?

texts:
I am using Magento Community Edition **1.9.2.**4.

Its a multi-store-webiste with 9 websites and 25 store views. At present the price re-indexing is taking 40 minutes.

This causing issue when I apply catalog price rules. It's taking very long time to complete rule apply process. At present, rule apply process is taking 30 Min's (if there 10 rules) and 40 - 50 minutes for price re-indexing (every time catalog rule apply happens price re-indexing will start automatically) Around 1.5 hours in total.

If I want to show a set of quick promotions on website, I need to wait so much time to see it on website. Is there any solution for this. ? I can't use cart rule instead of catalog.


texts: magento2 : How to copy a file programmatically in Controller

texts:
I have a controller execute() function in which I would like to make a file copy from a directory to another.

In Magento 1.9 I was using :

Mage::helper('core/file_storage_database')->copyFile($_OriginalPath, $_NewPath);

How to perform that in Magento2?

Edit 3:

I tried :

use Magento\Framework\App\Filesystem\DirectoryList;

    protected $_FileDB;

        public function __construct(
            \Magento\MediaStorage\Helper\File\Storage\Database $FileDB

                )
        {
            parent::__construct($context);
            $this->_FileDB = $FileDB;
        }

and

$this->_FileDB->copyFile($_oldPath,$_NewPath);

and still no file copied...


texts: What is the recommended number of Magento attribute option labels?

texts:
I have a store that has many attributes , especially the brand attribute which has more than 2000 brands & more will be there in the future .
Is it a good practice to have this much attribute labels under an attribute ? I just want to know the side-effects  of the large number of attribute labels .
The things i faced so far was with the following vars (increased the values already):

the max_input_vars , post_max_size etc.

Personally I dont like to see the huge list in the page.Even the web page itself will freeze for few moments .
I really need some advice. The store is built on Magento 1.9 CE planning to upgrade to 2


texts: Magento 2 : Is there a file system map for Magento 2?

texts:
Ultimately I want to add code snippets to some or all pages on my website, specifically, the code is the Facebook pixel code is the google tag manager code.

I've found a number of similar questions and they are usually well answered, but where I get lost is the files to use.

I've seen answers that say to put the "reference" block of code in XML files but they can be named from view.xml, default.xml, theme.xml, page.xml etc. And then when I search the Magento file system, I often get many many results.

The question is which file do I use?


texts:
Hei!
I am using magento 1.9.1.1 and also it's watches that I get from color attribute. I love the magento native system and I would like to add to it not replace.
I have certain colors for client to order like white or black and but I also have
Painting RAL color that should be picked with color picker as an exception.
So if you don't want any of basic colors offered you click Painting RAL and choose your color with picker and it counts as your custom swatch or so.
Found this plugin
https://www.yireo.com/software/magento-extensions/raloption
Put it seems to be making a special selector for it and is not to integrating it with swatches.

Any ideas anyone? In spe


texts:
Running Magento 2.3.2 and no matter what I seem to do I cannot get the contact us form to work.  I have tried all the solutions I think

Captha - Checked

Email- I set up the emails in config

template - I set to a template

not sure what i am missing been at it for days.

A thousand thank yous


texts: Remove store code from Catalog Product Link Widget

texts:
I am adding product links to a CMS page using the "Catalog Product Link" widget feature. The inserted code looks like such:

{{widget type="catalog/product_widget_link" title="title" template="catalog/product/widget/link/link_block.phtml" id_path="product/99"}}

The links are display with the store code at the end, such as ?___store=default. How can I remove this extra part of the url from these particular links?

I've looked at catalog/product/widget/link/link_block.phtml but I don't see where it says to display ?___store=default anywhere in the code.

NOTE: Under Add Store Code to Urls in admin, the option is selected to NO.


texts:
I'm a Magento newbee so please forgive me if there is ... a crap in the code ...
Sending Ajax request with Brand ID and current state "status = 1 or 0" and would like to update state in table:

public function BrandsAction()
{
    $brand_id = $this->getRequest()->getPost("brand_id");
    $status = $this->getRequest()->getPost("status");
    $_category = Mage::getResourceModel('catalog/category_collection')
            ->addFieldToFilter('name', 'Brands')
            ->getFirstItem();

    $categoryId = $_category->getId();
    $brands = Mage::getModel('catalog/category')->load($categoryId);
    $brand = $brands->load($brand_id);
    foreach($brand as $element){
        echo $element;
        if($element->getId() == $brand_id){
            $element->getData();
            $element->getAttribute('show_brand');
            $element->setData('show_brand',$status);
            $element->save();
        }
    }

I expected it will update value in column 'show_brand' but it actually does nothing just returning data back so I can see in  console what values were sent.
How to update value for specified "category -> Brand -> Somebrand" ??
Did I miss something ?

//just checking category id
$categoryId = $_category->getId();
//loading selected category
$brands = Mage::getModel('catalog/category')->load($categoryId);
//Loading Brand Data
$brand = $brands->load($brand_id);

isn't it ?
Or I misunderstood something ?

Current code:

    public function BrandsAction()
    {
    $brandNameId = $this->getRequest()->getPost("brand_id");
    $status = $this->getRequest()->getPost("status");
    $brandsNameCat = Mage::getModel('catalog/category')->load($brandNameId);
    $brandsNameCat->setShowBrand($status);
    $brandsNameCat->save();
    }

not updating values in table ... what I should check to make sure it willl update values ?


texts:
For various reasons I am currently forced to work in:
/app/code/local/Mage/Sales/Order.php

I know it's not ideal, but it's required at the moment.

in public function queueNewOrderEmail, I am looking to attach a file to the email that is being sent here.

I have tried:

$mailer->addAttachment(
                file_get_contents($attachment),
                'filename.pdf"
            );

and

$mailer->getMail()->createAttachment(
              file_get_contents($file),
              'application/pdf',
              Zend_Mime::DISPOSITION_ATTACHMENT,
              Zend_Mime::ENCODING_BASE64,
              basename($file)
          );

and

 $mailer->createAttachment(
                  file_get_contents($file),
                  'application/pdf',
                  Zend_Mime::DISPOSITION_ATTACHMENT,
                  Zend_Mime::ENCODING_BASE64,
                  basename($file)
              );

Error is:

exception 'Varien_Exception' with message 'Invalid method Mage_Core_Model_Email_Template_Mailer::createAttachment [truncated]

So this kinda makes sense... I guess Mage_Core_Model_Email_Template_Mailer can't use everything available in Zend... but how do I attach an email here? I am trying to avoid completely rewriting the function?

edit:
file_get_contents() works when I create a separate PHP script. The file in question is rather large (12mb).