texts:
I am trying to integrate the magento2.3.2 with gatsby js and Graphql. For reference please check this link https://www.gatsbyjs.org/packages/gatsby-source-magento2/

I have integrated everything but I get the below issue of

UNHANDLED REJECTION The "time" argument must be of type Array. Received type number

  Error: TypeError [ERR_INVALID_ARG_TYPE]: The "time" argument must be of type Array. Received type number

  - per_thread.js:105 process.hrtime
    internal/process/per_thread.js:105:15

  - index.js:174 Object.end
    [react-moto]/[gatsby]/[gatsby-cli]/lib/reporter/index.js:174:54

  - products.js:162
    [react-moto]/[gatsby-source-magento2]/nodes/products.js:162:16

  - Generator.next

on running this command gatsby develop


texts: First module HelloWorld in Magento 2.0 doesn't work

texts:
CentOS Linux release 7.1.1503 (Core)
WHM version 11.52.1.3 (Root access)
Cpanel Apache 2.4.16
PHP 5.5.30
MySQL 5.6
Magento-CE-2.0.0+Samples.* Extracted (.tar.bz2) on my server ,and ran
the Setup Wizard.

I did this example
http://cedcommerce.com/blog/magento2/hello-world-module/

public_html/app/code/Ced/HelloWorld/etc/module.xml

<config>
      <module name="Ced_HelloWorld" schema_version="2.0.0" setup_version="0.0.1">
      </module>
</config>

I also try

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

public_html/app/code/Ced/HelloWorld/etc/frontend/routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi: ="../../../../../ ../lib/internal/
Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="helloworld" frontName="helloworld">
            <module name="Ced_HelloWorld" />
        </route>
    </router>
</config>

I also try

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi: ="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="helloworld" frontName="helloworld">
            <module name="Ced_HelloWorld" />
        </route>
    </router>
</config>

I also add

public_html/app/etc/config.php

 ...
      'Magento_Wishlist' => 1,
        'Magento_WishlistSampleData' => 1,
        'Ced_HelloWorld' => 1,
      ),

I also run this commands line

  php-cli bin/magento cache:clean

  php-cli -f bin/magento module:enable --clear-static-content
  Ced_HelloWorld

->Unknown module(s): 'Ced_HelloWorld'

  php-cli bin/magento setup:upgrade

  php-cli bin/magento setup:di:compile

I also flush the cache of the admin panel.

I checked and pdo_mysql extension is installed
Permission directories 755 files and 644 for all Magento files

In browser magentodir/helloworld

Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.


texts: how to get the stock status without loading the whole product-efficient way

texts:
I have the sku in the page and I want to see if product is in stock or out of stock and to do that I have done this:

  $firstProductId = Mage::getSingleton('catalog/product')->getIdBySku('mysku');
                        $product = Mage::getModel('catalog/product');
                        $product->setId($firstProductId);
                        $inStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getIsInStock();

I want to know if I can achieve this without loading the whole product any other way which is more efficient or I am on the right path?


texts: How do I sort product array on Checkout Page by the products mother-category IDs?

texts:
I´m currently working om some modifications on my client´s Magento "One Page Checkout" page.

I have managed to get all the product items using this code:

$session= Mage::getSingleton('checkout/session');
$items = $session->getQuote()->getAllItems();

So now I can loop through the products in the cart and for instance echo quantity and price by writing:

foreach($items as $item) {
$itemquantity = $item->getQty();
$itemPrice = $item->getPrice();
}

Now, what I need to do is to sort the $items array so that the products in the loop comes out sorted by the products 1st./mother/root category ID.

As far as I can tell the $items array is sorted according to the order of which the products are added to the card.
So I need to change this sort order so that the products with the lowest mother-category ID comes first and the products with highest mother-category ID come last.

I hope someone out there can help me with this.


texts:
How i add a form in order view like this image

on click simply record the form in a database table, the information will always be seen in the own form.


texts: Simple product not map into the Configurable product after migrate data from 1.9.2.4 to 2.3.5-p1

texts: I'm trying to migrate data from 1.9.2.4 to 2.3.5-p1 with data-migration-tool but my configurable product didn't map with any simple product. How can i solve it???


texts: Magento1.9 : array_key_exists deprecated in after upgrade php7.4

texts: Am upgrading my magento1.9 site to php version 7.4. I got array_key_exists is deprecated in 7.4 version. In my magento site how to change that function. Some one says use isset or property_exists. How to use this and which one is better.


texts:
My wesite make a redirection from the home page to the Group Deals page with my magento 1.8 when the URL is http://www.example.com/

But when the URL is https://www.example.com/ or http://.example.com/ the redirection didn't work.

How can I make it work with the last 2 URLs

Thank you in advance

This is the redirect part in .htaccess:

  RewriteEngine On
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.+).(\d+).(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
  RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads> > >  > /|favicon.ico) - [L]
  RewriteRule ^typo3$ typo3/index_re.php [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule .* index.php [L]


texts: Magento2 - Add a colour picker attribute in category page

texts:
I am currently using magento2.1.3 and am trying to create an colorpicker attribute. I have created the install script and it has ran successfully showing the attribute in the db. I have added the below code into a category_form.xml file

category_form.xml :

    <?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
        <fieldset name="content">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Content</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">99</item>
            </item>
        </argument>
        <field name="cat_bannercolour">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">category</item>
                    <item name="label" xsi:type="string" translate="true">Category Banner Colour</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">40</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

My problem is that I don't know where to go from here. I have seen other colorpicker examples for grids but they seem to use a frontend_model which doesn't seem to be available in the ui_component. Any help would be great.


texts:
it looks like is not possible to use "Tier Price" when creating an order with API in Magento 2.x

Can you confirm that?
Is there a solution to create an order and get the price based on tier price group price ?

Dave


texts: Can a custom price be provided for an item when added through the API?

texts:
We use the SOAP API to process orders and carts, and would like to able to override the default price in some cases.

I have played around with the options and bundle_options variables as outlined in documentation, but can never seem to get a custom price to be used when adding the item to the cart.

Is this functionality natively supported through the API? If not, are there plugins that add support for this through the API?


texts: Get custom attribute value without loading the product

texts:
I'm trying to get custom product attribute value (for attribute code flr01) in catalog_product_save_after observer without loading the product but I'm gettin null value if I'm not loading the product before using following functions

$qty = $observer->getProduct()->getAttributeText('flr01');

or

$qty = $observer->getProduct()->getData('flr01');

While loading the product before using getData() method, I'm getting flr01 value

$productId = $observer->getProduct()->getId();
$product = Mage::getSingleton('catalog/product')->load($productId);
$qty = $product->getData('flr01');

I think loading the product again is not recommended from performance point of view (I should already have all product attributes available in $observer->getProduct() ).


texts: Add field to a confirmation block message

texts:
I need to add a field in my confirmation message in the block.

I have my class here

class Ismo_Myclass_Model_Observer extends Mage_Adminhtml_Block_Widget_Form_Container
{
    public function adminhtmlWidgetContainerHtmlBefore(Varien_Event_Observer $observer) {
        $block = $observer->getEvent()->getBlock();
        if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
            $order = $block->getOrder();
            if($order->hasShipments()){
                $message = Mage::helper('sales')->__('Are you sure you want to regenerate the stickers and resend the new tracking number to customer?');
                $block->addButton('order_Sticker_bouton', array(
                    'label'     => Mage::helper('sales')->__('Print Sticker'),
                    'onclick'   => "confirmSetLocation('{$message}', '{$this->getPrintStickerUrl($order)}')",
                ));
            }
        }

    }

I need to add a field like this

$block->addField('nb_sticker', 'text', array(
                    'name'      => 'nb_sticker',
                    'label'     => Mage::helper('sales')->__('nb sticker'),
                    'title'     => Mage::helper('sales')->__('nb sticker'),
                    'required'  => true,
                ));

but in the confirmation popup


texts: Category URL Key redirect to Product Link

texts:
For example, I have this category that I want to redirect it to product page, is this possible?

For example I have Kati Birch Forest product, and it's url key is kati-birch-forest

Then I want this Corporate Gifts Url key redirects to kati-birch-forest product INSTEAD of the category's own url key.

How do we do this? Is this possible? Thanks.


texts: Does not show categories or products in homepage

texts:
I need to list all the categories on the home page and is not working, I used:

{{block type="catalog/navigation" name="catalog.category" template="catalog/category/list_home.phtml"}}

I also just in case tried using other calls on the homepage and does not work as well:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="2" template="catalog/product/list.phtml"}}

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="3" template="catalog/product/list.phtml"}}

{{block type="catalog/product_list" column_count="4" category_id="3" template="catalog/product/list.phtml"}}

Someone can explain me wrong? I am using the theme RWD.

I have never seen that in my life in magento, but are experiencing this error.

I need to show the categories on the home page as the error first, i test try a workaround with two examples.


texts:
I have server without console ssh, how Can I work with Magento?
Work with XAMPP(with console) and upload (update) files to my server without console is right way?


texts: Magento 2 How to extend rules.js to add custom validation rules?


texts: How can I get the customer ID in a cached block when full page cache is enabled?

texts: When the full page cache is enabled Magento disabled the PHP sessions, this way I am unable to load the customer session and get the user ID.


texts: Magento 2 change Ship button in Order functionality

texts:
I'm trying to change the functionality of Ship button when you choose an order.
The only thing that I have found so far is this file under /vendor/magento/module-sales/Block/Adminhtml/Order/View.php:
I see this part where the button has an onclick method:
 $this->addButton(
                'order_ship',
                [
                    'label' => __('Ship'),
                    'onclick' => 'setLocation(\'' . $this->getShipUrl() . '\')',
                    'class' => 'ship'
                ]
            );

and then this is the URL
public function getShipUrl()
    {
        return $this->getUrl('adminhtml/order_shipment/start');
    }

I don't know if that url is a controller, I have not found a route with that id nor that exactly path. Or maybe it's an api?  This is the url that is shown on backend when I inspect
admin/order_shipment/start/order_id/60/key/ec0160f0fda15ac0271c4a0e1e2115471f7535673cc0e69f5c3af11deaba9ddf/'

Hope someone can give me a hint!
thanks


texts: Category products sort by position not working properly (Magento 2.3.5 with ElasticSearch 7)

texts:
Here is my environment
Magento 2.3.5
ElasticSearch 7
VarnishCache 5
All products have position set as zero.
If I disable ElasticSearch, then category page shows latest products first
but If I use ElasticSearch, then products are shown in some random order / not by creation date or entity id.
Please let me know how to fix this.


texts: Magento layout update not working on server

texts:
I'm facing a strange problem. I created a menu in admin backend. I wanted to display a form and submit it.

I created a module for that with controller and layout updates as well.

Now everything is working fine on my local server. I click the menu, a form opens, I submit it and everything is find.

Now when I upload this file on server (AWS Linux instance), my form (phtml) does not show. The layout is loaded but templates are not working. I checked carefully and all the files are uploaded properly.

I'm stuck at this for a long time now and do not know why is this not working on server while it is working fine on local system.

Please help me guys. If you want, I will post all my code here as well.

Thanks in advance


texts: Different Magento stores for different country

texts:
I want to create stores in Magento but I want those stores to be country specific. By country specific store means if the store is for France then its language will french and its product price will be completely different from the stores of other countries(stores). Checkout method of those stores may also differ according to the country.

Thanks.


texts: How to add customized column in Admin i.e Sales?

texts:
I have added customized column in sales_flat_quote_address table. Now I want to display the same in admin i.e Sales.

I have one another module,
app\code\local\Devsters\Pay\Adminhtml\Block\Sales\Order\Totals.php in that I added

 protected function _initTotals()
{
       $this->addTotalBefore(new Varien_Object(array(
            'code'      => 'customised_discount',
            'value'     => $customised_discount,
            'base_value'=> $customised_discount,
            'label'     => $this->helper('pay')->__('Customised Discount'),
        ), array('shipping', 'tax')));
     }
    return $this;

Then it got added successfully. But I want to create new module for that.


texts: How to integrate dinamically JS code in success page

texts:
I know that success.phtml is the file where I should put the code I want to execute, but I received from CJ this file which is not an html, its a php class.

I would like to know how can I integrate this file into the success.phtml ?

Thank you

class CommissionJunction extends Mage_Core_Helper_Data
{

    /**
     * Get SKU, quantity, price and discount amount for each product in a given order
     * @param object $order
     * @return array
     */
    private function _getOrderProductsList($order) {
        $orderItems = $order->getAllItems();
        $purchasedSkus = array();
        $count_orderItems = count($orderItems);
        for($i = 0; $i < $count_orderItems; $i++) {
            $purchasedSkus[$i] = array(
              'ITEM' => $orderItems[$i]['sku'],
                'QTY' => number_format($orderItems[$i]['qty_ordered'],0), // no decimals
                'AMT' => number_format($orderItems[$i]['price'],2) // 2 decimal places
                'DCNT' => number_format(abs($orderItems[$i]['discount_amount']),2) */
            );
        }
        return $purchasedSkus;
    }

    /**
     * Get the Universal Data (JSON) Object for Commission Junction.
     * This object contains the order details passed on to Commission Junction for reporting purposes
     * on the Checkout Success / Order Confirmation page.
     * Notes:
     *  - CID, TYPE AND CURRENCY are hard coded
     * @param string $orderId
     * @return JSON object Universal Data Object for Commission Junction $json_masterTmsUdp
     */
    public function getCommissionJunctionUdo($orderId) {
        $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
        $udo = array();
        $udo['CID'] = 'XXXX';
        $udo['TYPE'] = 'XXXX';
        $udo['CURRENCY'] = 'USD';
        $udo['OID'] = $orderId;
        $udo['DISCOUNT'] = number_format(abs($order->discount_amount),2);

        $order_coupon_code = $order->coupon_code;
        if(!is_null($order_coupon_code) && !empty($order_coupon_code)) {
            $udo['COUPON'] = $order_coupon_code;
        }

        $udo['PRODUCTLIST'] = self::_getOrderProductsList($order);

        if(Mage::getModel('core/cookie')->get('aff_commissionjunction') == 'cjafflx') {
            $udo['FIRECJ'] = "TRUE";
        }
        else {
            $udo['FIRECJ'] = "FALSE";
        }

        $masterTmsUdo['CJ'] = $udo;
        $json_masterTmsUdo = json_encode($masterTmsUdo);

        return $json_masterTmsUdo;

    }

}


texts: Magento2 creating and calling modal widget

texts:
I want to create custom modal popup widget and call on my .phtml file. How can I do that?

What will be the whole procedure for creating modal and accessing it from the .phtml file?


texts: Set redirect after customer new registration issue in Magento

texts:
I am using an observer with this event customer_register_success.I want to redirect my new customer to cart after the registration. This is my code from my observer:

$customer = $observer->getEvent()->getCustomer();
if ($customer){ // customer new registration after
   //Mage::app()->getResponse()->setRedirect($lastUrl); // This doesn't work
   Mage::app()->getFrontController()->getResponse()->setRedirect($lastUrl);
   Mage::app()->getResponse()->sendResponse(); // This works but the customer is not logged in.
}

If you check my comments from the code. How can i make the user to be redirected and to be logged in too ?

Thx


texts: Data migration tool : How can i use time zone handler for order purchase time for magento 1 server on IST timezone

texts:
I use the tool for migrate my data from my 1.9.2.4 to magento2.2.2

It works except a problem with date of purchase.

There is a difference of 5:30 hours, however the time zone on M1 Server is IST (Indian Standard Time)

I have configured map.xml

        <transform>
            <field>sales_order.created_at</field>
            <handler class="\Migration\Handler\Timezone">
                <param name="offset" value="+5:30"/>
            </handler>
        </transform>

It is not working


texts: Elasticsearch error - Undefined index | Trying to access array offset on value of type null

texts:
So when im trying to reindex my products im getting these errors.
Undefined index: prices_0 in../app/code/Wyomind/ElasticsearchCore/Model/Indexer/Product.php on line 938

Trying to access array offset on value of type null in

 app/code/Wyomind/ElasticsearchCore/Model/Indexer/Product.php on line
 938

I just some help in which direction i should go to solve this problem.


texts: How to show my page when i click link in customer account navigation?

texts:
I added link in customer account navigation but how to show my page like Account Dashboard? Thanks.

Like this:


texts:
What layout types are there for the UI form component?

The example in the documentation (http://devdocs.magento.com/guides/v2.2/ui_comp_guide/components/ui-form.html) have type tabs:

<item name="layout" xsi:type="array">
    <item name="type" xsi:type="string">tabs</item>
    <item name="navContainerName" xsi:type="string">left</item>
</item>

Although in a different syntax, the actual customer form file (vendor/magento/module-customer/view/base/ui_component/customer_form.xml) defines the same value:

<layout>
    <navContainerName>left</navContainerName>
    <type>tabs</type>
</layout>

For me, such configuration results in an error message output: "No element found with ID 'left'.". I guess, it's related to the "tabs" type of form component having a tabbed form with tabs attached to some "left" container in Admin, however, I want to add a form on a frontend page, and I don't need any tabs.


texts: SUPEE-5994 Patch installation error, fails on lib/PEAR/

texts:
I am attempting to install the SUPEE-5994 patch on Magento CE 1.9.0.1 but the following error is occurring:

[root@server httpdocs]# sh PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
patching file app/code/core/Mage/Customer/Model/Customer.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
patching file app/code/core/Mage/Install/Controller/Router/Install.php
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php
patching file downloader/Maged/Model/Connect.php
patching file downloader/Maged/View.php
patching file downloader/template/connect/packages_prepare.phtml
patching file downloader/template/messages.phtml
patching file get.php
can't find file to patch at input line 347
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git lib/PEAR/PEAR/PEAR.php lib/PEAR/PEAR/PEAR.php
|index b4633bf..e6f8edc 100644
|--- lib/PEAR/PEAR/PEAR.php
|+++ lib/PEAR/PEAR/PEAR.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
42 out of 42 hunks ignored
patching file lib/PEAR/PEAR/PEAR5.php
patching file lib/Varien/Io/File.php

Does anyone know how to resolve this?


texts: Top Nav Menu is not appearing in all pages?

texts:
Categories show in Menu When i install the Magento 2.2.2 v with sample data but when i install by custom theme the menu will disappear in luma default theme.

Please help me.


texts: Magento 2: Creating a custom indexer for my own module

texts:
I am new to Magento. I have a custom module in Magento 2 that has a table with data and CRUD models. I want to create an indexer for it to be able to push it to Elasticsearch.
I already created the indexer.xml and mview.xml files, as well as class inside the Model\Indexer namespace. Here it is:
namespace VendorName\Faq\Model\Indexer;

class Question implements \Magento\Framework\Indexer\ActionInterface, \Magento\Framework\Mview\ActionInterface
{
  public function execute($ids) {
    // ???
  }

  public function executeFull() {
    // ???
  }

  public function executeList(array $ids) {
    // ???
  }

  public function executeRow($id0 {
    // ???
  }
}

The official documentation has nothing to tell about how to get data for indexing - it only has a structure for the Indexer class.
Any suggestions, please?


texts: magento 2 html in ui component grid column

texts:
I want to add link to order in ui component grid for my custom logs table.

I was able to successfully split in lines log message with

       $item[$this->getData('name')] = html_entity_decode(nl2br($item[$this->getData('name')]));

but this approach does not work for anchors:

public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as & $item) {
            if (array_key_exists('order_id', $item) && !empty($item['order_id'])) {
                try {
                    if ($order = $this->orderRepository->get($item['order_id'])) {
                        $url = $this->storeManager->getStore()->getUrl('sales/order/view', ['order_id' => $order->getEntityId()]);
                        $item[$this->getData('name')] = html_entity_decode("" . $order->getIncrementId() . "");
                    }
                } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {

                }

            }

        }
    }

    return $dataSource;
}

in grid looks like http://i.imgur.com/aA86VlK.png

Is there a way to not escape html entities in the UI component grid?


texts: Disable the full_page cache for a specific controller

texts:
I have a controller that I want to exclude from the full page cache however want to cache the block rendered within the controller.

I have tried the below code however this does not seem to work:

protected function getCacheLifetime(){
    return null;
}

The full page cache continued with this.

I have also tried:

$this->addData(array('cache_lifetime' => null));

This however throws an error about undefined method addData()

I do not want to disable within layouts as this will disable the cache for the block. My block caching works fine and caches for however long I define.


texts: How to add receipent email in footer email template magento2

texts:
I have created custom footer email template by overriding it from Marketing >Email Templates.

I have an requirement where i have to display the recipient email address in the footer every-time in the email.

How to get the recipient email address in the footer email template.

Can anyone help me ?


texts:
After upgrade from Magento 2.0.2 to 2.0.4 I am getting follwoing error message

On Mini Cart

  You don't have permission to access /pub/static/frontend/Magento/luma/en_US/Magento_Checkout/template/minicart/content.html on this server.

On Products Page

  Forbidden
  You don't have permission to access /pub/static/frontend/Magento/luma/en_US/mage/gallery/gallery.html on this server.

I have upgraded system using Web Setup Wizard. I have taken following steps after upgrade

Index are regenerated,
Permission are applied again,
Flushed Magento Cache


texts: Magento 2: System.xml checkboxes not saving values

texts:
I created a system.xml with a checkbox:

<field id="wedneday" translate="label" type="checkbox" sortOrder="23" showInDefault="1" showInWebsite="0" showInStore="0">
                    <comment>Wednesday</comment>
                </field>

But as soon as I click "Save config" the tick disappears and I cannot get the value. Is there something I am missing?


texts: Magento : how to get certain element value from array - object

texts:
below you can see the value genrate through print_r
when i am trying get value of

$post->PostContent() -  return value is "post 1111111111111111Read More"
but i want to get second value that is - "post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111"

<?php foreach ($posts as $post):
    print_r($post);
    //below you can see the value genrate through print_r
    $post->PostContent();//second value that is long in length and have not included read more
?>

AW_Blog_Model_Blog Object
(
    [_eventPrefix:protected] => core_abstract
    [_eventObject:protected] => object
    [_resourceName:protected] => blog/blog
    [_resource:protected] =>
    [_resourceCollectionName:protected] => blog/blog_collection
    [_cacheTag:protected] =>
    [_dataSaveAllowed:protected] => 1
    [_isObjectNew:protected] =>
    [_data:protected] => Array
        (
            [post_id] => 1
            [title] => post 1
            [post_content] => post 1111111111111111Read More
            [status] => 1
            [created_time] => יום רביעי, 28 בדצמבר 2016 10:14:59 America/Los_Angeles
            [update_time] => יום רביעי, 28 בדצמבר 2016 15:42:00 America/Los_Angeles
            [identifier] => post1
            [user] => pooja chaurasia
            [update_user] => pooja chaurasia
            [meta_keywords] =>
            [meta_description] =>
            [comments] => 0
            [tags] =>
            [short_content] => post 1111111111111111
            [featured_image] => lady_image.jpg
            [comment_count] =>
            [address] => https://starksdiamonds.com/news/post1/
            [cats] => Array
                (
                    [0] => Array
                        (
                            [title] => News
                            [url] => https://starksdiamonds.com/news/cat/news/
                        )

                )

        )

    [_hasDataChanges:protected] => 1
    [_origData:protected] => Array
        (
            [post_id] => 1
            [title] => post 1
            [post_content] => post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111post 1111111111111111
            [status] => 1
            [created_time] => 2016-12-28 18:14:59
            [update_time] => 2016-12-28 23:42:00
            [identifier] => post1
            [user] => pooja chaurasia
            [update_user] => pooja chaurasia
            [meta_keywords] =>
            [meta_description] =>
            [comments] => 0
            [tags] =>
            [short_content] => post 1111111111111111
            [featured_image] => lady_image.jpg
            [comment_count] =>
        )

    [_idFieldName:protected] => post_id
    [_isDeleted:protected] =>
    [_oldFieldsMap:protected] => Array
        (
        )

    [_syncFieldsMap:protected] => Array
        (
        )

)


texts:
I've added a custom attribute to the customer. I've added a note to clarify the attribute.

The installer for the attribute:

<?php
$installer->addAttribute('customer', 'attribute_code', array(
    'type' => 'text',
    'backend' => '',
    'label' => 'Custom Label',
    'input' => 'multiselect',
    'source' => 'module_namespace/eav_entity_attribute_source_customcustomerattr',
    'visible' => true,
    'required' => false,
    'default' => '',
    'frontend' => '',
    'unique' => false,
    'note' => 'Instruction text',
));

I've added a csv to the module which works for the Custom Label but it doesn't work for the Instruction text

Magento prints the note in : app/design/adminhtml/default/default/template/widget/form/renderer/fieldset/element.phtml

<?php $_note = $_element->getNote();
// other
<?php if ($_note): ?>
    <p class="note<?php echo $_class ? " {$_class}-note" : ''?>" id="note_<?php echo $_element->getId()?>">
        <?php echo $_note ?>

<?php endif ?>

What am I missing?


texts:
I am new to magento. I am using magento 1.9 version. I want to create Shopping cart price rule module programmatically like default magento shopping cart price rule.

How to do this. What are the files used.

Is there any free extension available to do this.


texts: Expected to start loader but did not find one in the dom - Ajax Call Magento 2

texts:
I have implemented Ajax call to add product to cart, which is somewhat like below:

$.ajax({
    showLoader: true,
    url: SERVER_URL+'common/custompurchase/addtocart',
    data: data,
    type: "POST",
    dataType: 'json'
}).done(function (data) {
    // some code...
});

It is working fine. But it's not showing loading icon when i call Ajax. I have also tried below answers.

$('body').trigger('processStart');
$('body').loader('show');
var body = $('body').loader(); body.loader('show');

In console it's showing this warning.

  Expected to start loader but did not find one in the dom

Please provide suggestions if anybody has faced such issue.

Note: I have implemented this code on product detail page.


texts:
I need to upgrade magento to the latest version what is the right way to upgrade magento to the latest version?

overwrite old files with new files?

fresh installation?

or use the connect manager?


texts: Magento 2.1 - Custom Category Image attribute is not saved

texts:
I have created a custom category thumbnail attribute according to the post (Magento 2 create category attribute thumbnail and upload image using File Uploader Component).

The image gets saved in the "tmp" directory but is not saved when I save the category.

what is the issue for that?


texts: Get product path from id with category path in url

texts:
i want to get product url from id with category path in url :

for same product url are like :

http://websitename/rings/diamond/blue-diamond.html

http://websitename/blue-diamond.html

with my code i am able to get 2nd url , what to do to get 1st one from code , pls help..

$store = Mage::app()->getStore();
$path = Mage::getResourceModel('core/url_rewrite')
    ->getRequestPathByIdPath('product/456', $store);

$url = $store->getBaseUrl($store::URL_TYPE_WEB) . $path;

what to add extra to make it work


texts: Get Token Authentication For Customer Logged With Facebook & Twitter : Magento 2

texts:
Dears, I created a custom REST API, So customer can login Via facebook and twitter through mobile app. The API consists of one service which take some parameters and email parameter and check if this email is found or not.

-If found, then return customer id.

-If not found, then insert email and other parameters (firstname, lastname, socialid, socialtype).

My question, I don't save password for the customer because the response return from facebook doest not contain password, so how to get token authentication, so I can do all operations which request customer token?

In normal, I can login and get token through:

POST

 https://domain.com/index.php/rest/V1/integration/customer/token?username=test@gmail.com&password=12345

and response will be token.


texts: Data migration: "Init vector must be a string of 16 bytes" due to old weakly encrypted data in the database - what to do?

texts:
I'm migrating a Magento 1 store to Magento 2.3.4 and I'm encountering an error at the data migration "Map Step".

In Mcrypt.php line 81:

  [Magento\Framework\Exception\LocalizedException]
  Init vector must be a string of 16 bytes.

I've put my old M1 crypt_key into the config.xml file as usual - but that isn't the problem.

The problem is I have very old, weakly-encrypted data in my M1 database which apparently cannot be decrypted by M2.

Magento/Framework/Encryption/Adapter/Mcrypt.php line 81 checks that the correct $initVectorSize for the selected encryption cipher is used. In this case it expects a length of 16 bytes because it's trying to use the old MCRYPT_RIJNDAEL_128 cipher (see vendor/magento/data-migration-tool/src/Migration/Handler/Encrypt.php line 73). I assume this is what "old" Magento 1 data was encrypted with.

Hoever, I have data in my M1 database which is apparently even older. It seems to have been encrypted with an even older/weaker cipher with an init vector length of just 8 bytes (i.e. not MCRYPT_RIJNDAEL_128) and therefore the migration tool cannot decrypt it.

The data seems to be cc_number_enc from the sales_flat_order_payment table although I suppose there could be other similar data in the database elsewhere.

What should I do in this case? Should I just delete the data from the database and continue the migration? Or is there a better workaround?


texts: Is Magento 1.7.0.2. compatible with PHP 5.6

texts:
I now have to upgrade PHP from version 5.4.45 to 5.6. and I have 2 magento sites running on it.

What compatibility problems should I expect if any?


texts: How do I insert javascript immediately following the  opener, but only on the homepage? (Google Analytics AB Testing setup)

texts:
I'm fairly new to Magento development.

How can I insert code immediately following  (not before ) on the index/home only?

I'm trying to insert some JavaScript for a Google Analytics Content Experiment Code (AB test). I was told that the code must be inserted immediately following the  tag. The Miscellaneous Scripts function will not work, because it inserts just before the , and after getChildHtml('head').

I'm also not sure how I'd get the home page (CMS page) to reference my custom template, should I go the more obvious route.

All insights are welcomed!


texts:
I have to create a custom module (or anything else what let me do what i want to), which will display few latest pictures from my instagram on homepage. I do not know how to use Instagram api to do this, where to put which code. If you have any advice how to do this, it will be nice. It does not have to be very complicated. Just take for example 5 latest pictures and display them in custom block. I know how to create custom module, create block and display it on homepage. I dont know how to take pictures url from my instagram and put them into my module.

Thank you for any help.


texts: set product attribute without loading full product

texts:
Mage::getResourceModel('catalog/product')->getAttributeRawValue($id, 'attribute', Mage::app()->getStore());

This can be used to fetch the product attribute by ID.  How can one set this value as well?


texts: Magento 1 : Http 500 error after installing extension of size chart

texts:
Making website on Magento 1.9.
i installed an extension of sizechart by extension mall but after installing it gives an error of HTTP 500 error and after uncommenting
ini_set('display_errors', 1);
( it shows following error )

Fatal error: Class 'ExtensionsMall_SizeChart_Helper_Data' not found in
/home/iranucom/public_html/app/Mage.php on line 547

can anyone guide how can i solve the same.


texts: Problem coming during product import using Magmi

texts:
I need to import a product with Magmi.

The import worked in old web site, but not in new website.

It's the same source file but the file is not imported.

In log file there is:

 Got error 'PHP message: PHP Notice:  Undefined offset: 0 in /var/[...]/magmi/engines/magmi_productimportengine.php on line 1219\n

what can be the problem?

Thanks


texts: Magento 2: how to save a new instance of a custom model to the database (INSERT INTO instead of UPDATE)

texts:
I have created a model and a repository to save the model, the only functions I can find in the model->getResource() are save, load and delete. The save function always uses an UPDATE statement, so how can I save a new instance of my model to the database?

I am a bit confused because while searching for a solution I could only find people who have the opposite problem, their save function uses an INSERT INTO statement instead of UPDATE.


texts: Magento 2 reutilize components and template.html

texts:
I have been searching how can I use ko component inside another ko component and extend in order to create complex forms.
I just don't get it how it works.
Whit this I was successfully tu extend a component:
define(['jquery', 'uiComponent', 'ko', 'Vendor_Application/js/general-form'], function ($, Component, ko, Form {
    'use strict';
    return Form.extend({
        defaults: {
            template: 'Vendor_Application/portability-form'
        },
        initialize: function (config) {
            this._super();
            var self = this;

            console.log("Hello from the port form");
        },

    });
}
);

I was able to extend all my genera-form js functions without the need to write them again, but now, how can I add some fiels that are unique of this port-form to general-form template?
I know there is some data-bind = scope: component, but if I do this, won't I lose some functionality on js methods?
Or if I add 2 templates from 2 different component (one extending other) will I be able to have share variables?
Greetings!


texts:
I would like to customize my magento home page.

How to Edit fonts in magento rwd theme to default theme font?
How to edit color of the text in homepage?


texts: Set product retail price programmatically

texts:
How can I set the Manufacturer's Suggested Retail Price of programmatically added products? I have tryied to use $product->setRetailPrice() but the price didn't change, it is blank. How to change it or what class method to use?

The product is created with: $product = Mage::getModel('catalog/product');


texts: Error Payment Gateway Braintree in Magento 2

texts: I have a problem in the Payment Gateway in Magento 2, when I capture the data of the credit card I see the error that comes in the picture, I would like to know if you could help me. I'm working with the Braintree sandbox information. Thank you very much.


texts:
I'm trying to make a coupon code that provides my giveaway winner with one free pair of socks and free shipping.

If the winner decides to add another pair of socks, I want the coupon to still give one free but charge for the other pair and then add my standard shipping charge.

I get either all of the items for free or it always gives free shipping.

Any advice? Thanks!


texts: Blackbird Advanced Content Manager 2 - Get date created/published/modified in php template?

texts:
I'm using this module 'Blackbird Advanced Content Manager 2' for blog posts.

I want to get the date created / published / modified and output it in the php template.

There is no mention of this anywhere in the docs. Has anyone worked out a way of doing it?

Such a simple / common / necessary thing for blogs, can't believe there doesn't seem to be a function for it :/ Judging by the lack of information online I'm guessing no one uses this plugin because it's rubbish?

If I try their method to 'get all raw values'
$content->getData()
Annoyingly I always get a 'php memory exhausted' error (Even when I set memory_limit to 50Gb!). So I don't know if there is a 'date' field available in there. I've also searched the module php in app/code looking for any mentions of date variables but couldn't find anything useful.


texts:
I have migrated my Magento 1.x code to new hosting provider, my website comes back good but admin fails with below admin panel error any help

/app/code/core/Mage/Core/Model/Observer.php(47): Mage_Core_Model_File_Storage->getSyncFlag() #1


texts: How to make bundle of two configurable products?

texts:
I am developing a jewelry store in magento.
In this store mainly there are types of products:
1) Engagement Rings
2) Wedding Rings
3) Loose Diamonds

1) Engagement Ring :
In this there will be two configurable products Ring + Diamond.
Both Ring and Diamond will be configurable products and attributes for that are:

Ring => Metal [Yello Gold, White Gold, Rose Gold, Platinum]
Diamond => Color [D,E,F,G,H,I] , Shape [Circle, Square, Oval]

So, I want to allow user to select ring + diamond as in this site : www.77diamonds.com/classic_rings.html

so, How to add two configurable product to cart as a bundle product?


texts: Made ship on order generate an error. Magento ver. 2.2.0-dev

texts:
I installed Magento 2.2.0-dev. I created a new customer and a new product. I created an order and invoicing. Everything OK. I also can hold and reorder. But when I go to put the order shipping they generate a error. And don't let me do it.

Exception #0 (RuntimeException): Renderer for type "simple" does not exist.
 Any ideas.


texts: How to Create a module with template file of only block?

texts:
I am creating a module for Widget like - Top 5 Products, Product of the Day, Best rated product, Random 5 product, latest product and this will be placed on external website via/in iframe, I don't want the output to be cached by FPC/Varnish
Which can be archived by
<block class="\Magento\Framework\View\Element\Template" template="sample:module::sampletemplate.phtml" name="sampleblock" cacheable="false" />

cacheable="false" is used
and I want only the block template no header, footer or content area just the module output, some thing in the image below.

Question : How can I create a controller with only module output, no header, footer, no css and js, no <head>, <body> tags, etc, and the output should not be cached ?


texts:
Earlier I was not selling any digital downloadable products so I had removed My Downloadable Products option from customer account menu by replacing :

<?php $count = count($links); ?>

with

<?php $_count = count($_links);
 unset($_links['downloadable_products']);
?>

but now I have started selling downloadable products so I want the option back.

I replaced the above unset code with <?php $count = count($links); ?> but still the downloadable option is not showing up.

I checked downloadable.xml and could find

<customer_account>
    <reference name="customer_account_navigation">
        <action method="addLink" translate="label" module="downloadable">
            <name>downloadable_products</name>
            <path>downloadable/customer/products</path>
            <label>My Downloadable Products</label>
        </action>
    </reference>
</customer_account>

I have tried copying base files like downloadable.xml, checkout.xml, downloadable (Directory), customer (Directory), etc. to the customized theme. I also tried by deleting or renaming those files from custom theme. It didn't help at all. Is the menu disabled in the database? How can I get it back?


texts: Pass variable to observer from controller does not works

texts:
How can i pass variable to observer from controller?
Or is there a way to wait that execute observer before execute method in controller?


texts: Magento 2 showing another header color in mobile layout

texts:
I have just installed Magento 2 with freego as theme.
When the site is showing on  a computer screen, the background of the header area is dark, so therefore I put in a white logo.
The problem is when the site is shown on mobile screens under 767px (I think), the header area turns white. I was thinking about using the same logo in black on the mobile layout as the other icons in header also changes colour.
Which file(s) needs to be edited? Or how is this possible to solve?


texts:
Yesterday, I was having an issue with horizontal top menu as I wanted to make them invisible on frontend.
I made it invisible by using css as:

body.cms-my-homepage div.main-menu.menu-style-2{display:none}

And it worked for me but this code also disabled the mobile menu. Is there any other way, means by which I can enable the mobile menu
or specify a new mobile menu?


texts: Magento - specific mobile / desktop Menu

texts:
I have found a lot of different ways to make the mobile menu different from the desktop one, but I'd like to use the same menu, but in different sequence. Is it possible at all in Magento?

e.g. I have 1. Home, 2. Cart, 3. Account in desktop view, but when it changes to mobile menu, the same list should be: 1. Cart, 2. Home, 3. Account.

I didn't find any guide to this specific question. Any Idea? :/


texts: How to get custom session value in javascript set through Magento\Framework\Session\SessionManagerInterface?

texts:
Following program is used to set value of custom session variable country.

<?php

namespace Vendor\Module\Controller\Index;

use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ResponseInterface;

class Country extends \Magento\Framework\App\Action\Action
{
    public function __construct(
        Context $context,
        \Magento\Framework\Session\SessionManagerInterface $sessionManager
        )
    {
        $this->session = $sessionManager;
        parent::__construct($context);
    }

    public function execute()
    {
        $countryId = $this->getRequest()->getParam('country');
        $this->session->start();
        $this->session->setCountry($countryId);
    }
}

Now, how I can get country's value in any javascript file?


texts: getURL not finding my custom module controller

texts:
I am adding in a new mass action for the sales order grid and when I am putting in the url for my action Magento cannot find my controller.

config.xml

<admin>
    <routers>
        <mymodule>
        <use>admin</use>
        <args>
            <module>Namespace_mymodule</module>
            <frontName>frontendname</frontName>
        </args>
        </mymodule>
    </routers>
</admin>

<global>
    <events>
        <adminhtml_block_html_before>
        <observers>
            <mymodule>
            <class>Namespace_mymodule_Model_Observer</class>
            <method>addActions</method>
            </mymodule>
        </observers>
        </adminhtml_block_html_before>
    </events>
</global>

observer.php

public function addActions($event)
{
    $block = $event->getBlock();
    if($block instanceof Mage_Adminhtml_Block_Sales_Order_Grid)
    {
        $block->getMassactionBlock()->addItem('cpsync', array(
            'label' => 'Push Orders to CounterPoint',
            'url' => Mage::helper("adminhtml")->getUrl("frontendname/adminhtml_index/push/")
        ));
    }
}

Whenever I try to use my mass action it sends me to a 404 redirect page with url

sitename.com/index.php/frontendname/adminhtml_index/push/key/


texts: Merge Account tab with Menu tab in mobile menu

texts: New to Magento. I am trying to merge the content of the two default tabs on mobile view into one tab. Is it possible to add store.links (Account) as a link in the store.menu (Menu) much like the Industries link?


texts:
I want to pass the product info after is ordered and i have created this file for testing. The foreach is not working because it show back just one product and not all of them.

Here is the code:

    $dirPath = Mage::getBaseDir('var') . DS . 'export';

    if (!is_dir($dirPath)) {
        mkdir($dirPath, 0777, true);
    }

    foreach ($order->getAllItems() as $item){

        $data = array(
            'ID'    => $item->getProductId(),
            'QTY'   => $item->getTotalQtyOrdered(),
            'PRICE' => $item->getSubtotal()

            );

    }

    $xml = new SimpleXMLElement('<root/>');
    array_walk_recursive($data, array ($xml, 'addChild'));
    file_put_contents(
    $dirPath. DS .$order->getIncrementId().'.xml',
    $xml->asXML()

    );


texts: How to display crossed swatches for not available sizes in Magento 2?

texts: I've set up a text swatch for sizes S, M, L. When a size is sold out I want Magento to display the sold out size with a red mark instead of hiding that size option.


texts:
I have a custom payment module, I am storing certain data in the AdditionalInformation field.

I want this data then displayed inside the Payment Information block from an admin view.

To do this I want to replace the file:
app/design/adminhtml/default/default/template/payment/info/default.phtml
with
app/design/adminhtml/default/default/template/MYTEMPLATE/payment/info/default.phtml

How can I do this?


texts: Magento 1.9.1 Setting Default Value for Options

texts:
How can I set a default value if the radio buttons in the Associated Products doesn't appear anymore.

According to the screenshot here you can select a default option by ticking one of the radio buttons beside the option:

SOURCE: http://icebergcommerce.com/software/blog/iss/article/magento-configurable-products-setting-default-value-for-options/

As shown in the screenshot above, you can select a default option by ticking one of the radio buttons beside the options. But now the radio buttons are gone. Below is the current screenshot of Magento 1.9.1 Associated Products tab of a Configurable Product:

The question is, how can I select a default option if the radio buttons no longer exist?


texts: Magento 1.9 add new products to homepage with Layout update XML only

texts:
I manage to show 4 'new products' on my homepage. In my Homepage > Design > Layout update XML i put the following code:

<reference name="content">
        <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page">
            <action method="addPriceBlockType">
                <type>bundle</type>
                <block>bundle/catalog_product_price</block>
                <template>bundle/catalog/product/price.phtml</template>
            </action>
        </block>
</reference>

I changed also the template path from:

template="catalog/product/new.phtml"

to

template="catalog/product/widget/new/content/new_grid.phtml"

But is my code correct like this? Or do i have to change this also (and how?)?

template="catalog/product/widget/new/content/new_grid.phtml"


texts: Show Simple Product's Title and SKU in Cart when ordering Configurable

texts:
I'm trying to find a solution to modify the items ordered in shopping cart, when user selects cofigurable product then select color swatch of simple product, trying to show the simple product title/sku in cart instead of the parent configurable product title on this website http://buymydrap.com/cotton/cotton-dinner/ecru-cotton-dinner-napkin.html

I've done a work around to where it's showing the options info in front of the config. product title, but this is confusing for the customer and admin, so i'm trying to keep the color swatch feature as is with config. and simple product setup, but want to have the order and invoice only show the simple product color /sku at checkout.


texts: How to Install the magento manually without wamp or xampp?

texts:
How to Install the magento 2.2.3 manually without using wamp or xampp?

I had installed apache and mysql on my system.


texts: Magento 2 - Magento 1 migration : all product links are error 404

texts:
I am busy with another migration of Magento 1 to Magento 2.3.5,
I have managed to get my categories working, all categories show products associated to them (used Iazel_RegenProductUrl module for this.
However, every single product (simple/configurable/etc) returns with an error 404 page of Magento 2.
I am aware that indexer:reindex _in Magento 2 does not recreate URL rewrites` according to other resources found here on StackOverflow, there were also suggestions to run a 3rd party url rewrite regen module.
I have used the following modules:
Iazel_RegenProductUrl
OlegKoval_RegenerateUrlRewrites

First off, I decided to drop OlegKoval_RegenerateUrlRewrites as an option.  22000 products would take hours with this module.  It takes around 15 minutes on my dev machine to generate 1500 product SKUs and their URLs, so that is absolutely no solution to attempt further.
Running
bin/magento regenerate:product:url command that was added by Iazel_RegenProductUrl takes around 5 minutes to generate ~103000 rewrites (around 4+ each per product, based on categories).
One product example:
SELECT * FROM url_rewrite ur
INNER JOIN catalog_url_rewrite_product_category curpc
ON ur.url_rewrite_id = curpc.url_rewrite_id
WHERE entity_type NOT IN ('category')
AND entity_id = 409398;

I need some assistance with someone that can compare data with their database, or advise which queries to run to verify data consistency.

The store_id here is ID 1, I also have a store id 0 inside store table (and store website). I don't know how to make sure they are configures correctly ---- this is from the Migration Tool import result.

Does the store_id here have an impact on why the products are showing error 404?
This reason I am asking: it does not make sense when I take the working category URLs into account:
SELECT DISTINCT(store_id) FROM url_rewrite ur;

Only returns 1.  The whole url_rewrite table only has store_id 1.
Please help me to assist in resolving / compare database tables.
SOLUTION
While this answer asked about database tables (specifically url_rewrite), the issue turned out to be another table:  see my answer regarding catalog_product_entity and its attribute_set_ids.
Also: If you just came here about URL rewrites: use the module I linked in the answer, and do not use Iazel_RegenProductUrl because it has been depecrated.


texts: magento 1 enterprise to magento 2 community

texts: Is it possible to migrate from Magento 1 Enterprise to Magento 2 Community edition? Or is the preferred way to migrate from Magento 1 Enterprise to Magento 1 Community and then to Magento 2?


texts: Add configurable products to cart from category page

texts: Is there any way that we can add configurable product to cart from category page with their attributes, like color, size etc ? Right now when i add any configurable product to cart it redirects me on product page.


texts:
All of my payment methods seem to have disappeared, i know the correct files are being called as when i turn on template paths in the back end i see them all there but nothing is displaying. This is a new problem as i was testing the checkout just the other day and everything was working fine. If you need any of the code that is begin called let me know

These are the errors in the console

Failed to load resource

…
4
Payment Information

 opcheckout.js:61
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.website.com/js/prototype/windows/themes/magento.css

Has anybody had this problem before and know how to fix it as i am at a loose end.

Thank you


texts: related products (related.phtml) collection showing all products in one custom theme and just one of products showing in the other theme

texts:
it is so weird and I used the template path hints and everything is reading from the default theme but one of the themes is working properly and one other is not

$this->getItemCollection()

in related.phtml has 1 product for one of the themes and has more than 8 products in the other theme I tried to remove the themes or rename theme but I found that the problem is not from

app/design/frontend/enterprise/mytheme

problem is somewhere else I also checked the
app/code/core/Enterprise/TargetRule/Block/Product/abstract.php
I cannot find why it happens

update:we found that when added to cart it will be removed from results of related now how to solve this default filter of magento?

https://gist.github.com/arosenhagen/2489863

this worked for me although I changed my Targetrule folder not the one mentioned and now i can see the products even if they are in the cart
but still i don't have all my products in related

any idea would be appreciated


texts: as you can see create an account and login is missing from the frontend


texts: Shopping cart is empty when adding a product to the cart

texts: I have a bit of a strange one, when I add a product to the cart on my website I get "SHOPPING CART IS EMPTY". But when use a private window in Firefox or Chrome, it works fine. I am concerned it's not working for customers, I am unsure how to fix this.


texts: I have ultimo theme on magento 2.3.3 with redis and varnish. After Sign Out the link still displays Sign Out and vice versa. Becomes normal after cache is flushed. looks like cache issue. Any help highly appreciated.


texts:
$image="<img src="echo $this->getViewFileUrl('Inchoo_Helloworld::images/Phone.jpg'

To know whether this code is correct to retrieve image from Module


texts: How to add manual text to header in Magento 2

texts:
This question probably stems from not being enough of an expert to actually be working on my own Magento store, but I am doing my best.

I would like to add a container of text directly above the search form in my Magento 2 header. I assumed this would be as easy as finding the file that contains the search block and inserting the div. Evidently, that's not how things work anymore.

Can you please advise me about the best way to do this? Basically, I would like to be able to have an area above the search bar where I can do callouts and promotional codes.

This should be simple...and it probably is. But I am lost.


texts:
Since I cannot find any documentation or references to good / complete translations. I decided to ask this on Stackexchange. Is there any descent listing? And what would you use for the above locales? (first time I need to implement them and my German is not that imba)

Thanks for the help!


texts: Your web page contains the meta tag "viewport" twice. You should remove the second meta tag, even if it is embedded in an iframe HTML tag

texts:
My web page http://beachsandchairs.com/ contains the meta tag "viewport" twice.

 Beach Chairs  extra comfort at beach -outdoor beach chairs

How true is that because of this search engines could regard it as a spamming attempt and not index my site?
Could the second meta tag be remove without creating a problem?


texts: enable multiple modules for same namespace

texts:
I am installing a few modules one by one into my magento 2 application.  Can we enable all modules in the same namespace with one command?

Right now I am using:

php bin/magento module:enable Vendor_MyModule1
php bin/magento module:enable Vendor_MyModule2
php bin/magento module:enable Vendor_MyModule3

Is there a way I can do this with a wildcard?

php bin/magento module:enable Vendor_*


texts: Why web browser can't read "data-mage-init" attribute?

texts:
I am working on JavaScript add-on. while trying to read HTML loaded on the browser via chrome's developer tool -> element tab.

the code was executing fine. but I can't see attribute. it is a just simple custom attribute, right?

this question is only for the knowledge base.

on save button there should have extra attribute "data-mage-init" which help to execute some javascript.


texts: Product image gallery stacking images - Porto Theme

texts:
My product page is 1 column, and I have my Porto settings for my product images set to Full Width. For some reason, my product images are all coming up stacked one on top of the other, and no matter what setting I use, I can't get them to show as a gallery.
Running Magento 2.3.5 with latest version of Porto Theme (3.2.4)


texts:
I am running a Magento CE 1.8.1.0 - This question is about Magento, and no third party modules.

All the products on my site are configurables. At times I would oversell some products. Investigating these orders led me to the quote object.

For all of the orders which I have oversold I can see a quote, but I see no quote items in the sales_flat_quote_items table. Why is this so?

Also looking at the sales_flat_order_items table, I see, for these orders no simple entries, only configurables.

I wrote a simple sql to lookup quotes that have no quote items, and there seem to be a lot. Why is this so?

SELECT COUNT(DISTINCT increment_id) FROM db.sales_flat_order sfo
LEFT JOIN db.sales_flat_quote_item sfqi
ON sfo.quote_id = sfqi.quote_id
WHERE sfqi.quote_id IS NULL;

UPDATE:
I have manage to reproduce the issue to a degree.

STEPS TO REPRODUCE.
Add a config product to the cart, check the sales_flat_quote_items table, see 2 rows (config+simple) - delete the simple row leaving only the config. Order get's placed successfull no stock is deducted from the simple

I think this is what is happening to me - will investigate further but I think this could happen in stock magento stores with high volume traffic because there doesn't seem to be a check on this

For the record, my site regularly sees con-currents of 3000+


texts: Excluding products from multiple categories in collection

texts:
I have a rather specific problem regarding product collections and excluding multiple categories. The following code example does almost exactly what I want to achieve: getting a product collection with the most sold products and excluding all categories that contain the word "free". There is only 1 problem: I can only filter on 1 product category, since products can have multiple categories there are still products shown that had a category containing the word free. Is there a way the filter away all products that have at least 1 category containing the word free?

        $freeCategories = array();
        $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();
        $categories = Mage::getModel('catalog/category')
            ->getCollection()
            ->addFieldToFilter('path', array('like'=> "1/$rootId/%"))
            ->addFieldToFilter('name', array('like' => '%free%'));

        foreach($categories as $category){
            $freeCategories[] = $category->getId();
        }

        $storeId = Mage::app()->getStore()->getId();
        $products = Mage::getResourceModel('reports/product_collection')
            ->addOrderedQty()
            ->addAttributeToSelect('*')
            ->setStoreId($storeId)
            ->addStoreFilter($storeId)
            ->setOrder('ordered_qty', 'desc') //best sellers on top*/
            ->setPageSize($amount)
            ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
            ->addAttributeToFilter('category_id', array('nin' => array('finset' => $freeCategories)));

        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
        Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);


texts:
Got some really strange behaviour with Magento 2.2.8.
Seems like the cache (using Magento built in cache) and site environment settings are locked and will not change.
I have disabled caching through env.php, cache:status confirms all caches are off, but admin Cache Management screen says all enabled (apart from one previously disabled).
Have changed to developer mode using CLI, and manually changing in env.php, but developer tools do not show in admin.
Weirdest of all, trying to update template files in a custom module. I have uploaded a new version of the phtml file and run the usual commands:

rm -rf pub/static/* generated/* var/cache/* var/view_preprocessed/* var/page_cache/*
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
bin/magento cache:clean

Granted, some of these steps shouldn't be required when in developer mode, but since Magento is lying and telling me it's in dev mode, but behaving like it's in production this seems to be the only way.
Sure enough, my template updated.
I had to make some further changes, so uploaded another version of the template, ran through the process as before. This time no update to output when testing. Eliminate browser caching by using Incognito mode, different browser, even loading on another computer, still no change.
This behaviour has been going on for a while.
The site is a test clone of a production site. So decided to re-clone. Production site has never had either of the updated templates applied.
After re-cloning site (complete delete and re-copy from production site) the first updated page is still being displayed on browser. The code for this is not even in the template that is on the server.
Any one have an answer for why this is and how to fix?


texts: Magento 2 Custom Product block using SKU in cms page

texts: I want to display custom product block in cms page . I have sku of the products . No how can i display this product in cms page . I know how to display one product using sku . But is it possible to display multiple product using sku ?


texts: Magento 2 copy value from custom attribute to order item

texts: I have created a custom attribute for products. And I have also created an extra column in sales_order_item. How can I copy the value from this custom attribute to the new column in sales_order_item when an order is placed?


texts: Magento2: After delete pub/static folder and making deploy, no css files found

texts:
I use Magento 2 custom theme and when I made changes to .less file, I wanted to compile files, so I deleted pub/static folder and made deploy: php bin/magento setup:static-content:deploy. After that, no css files are found in pub/static/frontend/<Theme>/default/css. Also, when I use grunt less, I got errors:

>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email-inline.css not written because no source files were found.

I am in a developer mode.

Does anyone have any solution for this?

Thank you


texts: PayU: Fatal error: Call to a member function getFirstname() on a non-object in /var/www/html/app/code/local/Gfgrisales/Payu/Model/Payu.php on line 120

texts:
I recently install the PayU plugin downloaded from the PayU website. After installing the plugin my website is working fine and also I have the payment options on the checkout page for PayU payment but when I select payment option as "PayU" I get following errors:

  Fatal error: Call to a member function getFirstname() on a non-object in /var/www/html/app/code/local/Gfgrisales/Payu/Model/Payu.php on line 120

I tried to look at the code at line number 120 in file Payu.php and it looks like this:

$params = array(
    'merchantId'            =>      $merchant_id,
    'referenceCode'         =>      $orderIncrementId,
    'description'           =>      $ProductName,
    'amount'                =>      $paymentAmount,
    'tax'                   =>      $tax,
    'taxReturnBase'         =>      $taxReturnBase,
    'signature'             =>      $signature,
    'accountId'             =>      $account_id,
    'currency'              =>      $currency,

    'buyerFullName'         =>      $order->getShippingAddress()->getFirstname().' '.$order->getShippingAddress()->getLastname(),
    'buyerEmail'            =>      $order->getCustomerEmail(),
    'shippingAddress'       =>      $order->getShippingAddress()->getStreet1().' '.$order->getShippingAddress()->getStreet2(),
    'shippingCity'          =>      $order->getShippingAddress()->getCity(),
    'telephone'             =>      $order->getShippingAddress()->getTelephone(),

    'payerFullName'         =>      $order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname(),
    'billingAddress'        =>      $order->getBillingAddress()->getStreet1().' '.$order->getBillingAddress()->getStreet2(),
    'billingCity'           =>      $order->getBillingAddress()->getCity(),
    'payerPhone'            =>      $order->getBillingAddress()->getTelephone(),

    'test'                  =>      $test,
    'confirmationUrl'       =>      Mage::getUrl('payu/payment/notify'),
    'responseUrl'           =>      Mage::getUrl('payu/payment/success'),
    'extra1'                =>      $extra1,
    //'gateway_url'         =>      $gateway_url,
);

as I am newbie in Magento and PHP i can't find how to fix the above issue. Also it will be great if someone can explain that why this issue happens.

Thanks in advance.


texts: How to change the minicart icon in theme header?

texts:
How do I change the mini cart icon to my own SVG in the theme header?
I guess CSS isn't the best practice so thinking of other options.
is it this one in view.xml?
        <image id="mini_cart_product_thumbnail" type="thumbnail">
            <width>75</width>
            <height>75</height>
        </image>


texts: filter_condition_callback using Ui Component - Magento 2

texts:
I have a customer column in my custom module admin grid (created using UI component) where I show the customer name. But in database I save customer Id. I need to use the filter on customer name as input box in my grid filters. When I filter the grid by customer ID it works fine.

My question is how I can filter it by using customer name?
Same as we do in Magento 1 using filter_condition_callback.


texts: How to add login form to home page in Magento 2.3.4

texts:
I had added the login form in the home page using the block, i inherited the block to home cms page the form is also viewing correctly but when iam using invalid credentials the page is redirected to default login page and showing the error i want to display all kind of error in cms page login section and want avoid the redirection to www.yourdomain.com/customer/account/login/

Inherited the block in cms home page:

{{block class="Magento\Customer\Block\Form\Login" template="Magento_Customer::home_login.phtml"}}

I also tried other ways like showing the login section using adding in cms_page_view.xml layout

The code added in the cms_page_view.xml

<container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">
            <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="Magento_Customer::form/login.phtml">
                <container name="form.additional.info" as="form_additional_info"/>
            </block>
            <block class="Magento\Customer\Block\Form\Login\Info" name="customer.new" template="Magento_Customer::newcustomer.phtml"/>
        </container>

This also behaving as same. When entering invalid credentials it redirects to www.yourdomain.com/customer/account/login/

Please give the solution for my problem.

Thanks in advance :)

Regards,
Sabareesh


texts: Paypal Pro won't redirect after succesful payment on Magento 1.9.0.1

texts:
I'm running a store with Magento 1.9.0.1.
It's setted up to process payments with Paypal Pro but I have a problem. Everytime I make a payment I don't get redirected to the success page, instead I have on the javascript console this error:

Invalid 'X-Frame-Options' header encountered when loading 'https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?execution=e1s1': 'ALLOW' is not a recognized directive. The header will be ignored.

I tried everything but I seem not to be able to resolve this problem.

Can anyone help me? Thanks.


texts: displaying certain payment methods for customer groups

texts:
I am very new to the magento checkout process so forgive my lack of knowledge. Is there a way of displaying certain payment options for certain customer groups. For example i have changed the "purchase order number" to "30 day credit account" but this is only available to a certain customer group so I only want it to display when the user is logged in and is part of that customer group.

Again sorry for my lack of knowledge, if you can help you would be a life saver.

Thank you


texts: Order confirmation email not going for Authorize.net payment method

texts:
I am using magento2.2. In my site order, confirmations emails are going for Cash on delivery payment but order confirmation emails are not going for Authorize.net  payment method.

Any idea why order confirmation emails are not going for Authorize.net  payment method? How can I debug?


texts: Create popup with an attachment file on popup that will be saved in database

texts: How to create popup on PDP page and in popup form, how to add attachment file that will save in database.


texts: How to add customer Id in table Magento 2

texts:
This is my code but I can't get the customer Id that's currently logged in.

public function checkotp(){

    //db connection
    $this->_resources = \Magento\Framework\App\ObjectManager::getInstance()
    ->get('Magento\Framework\App\ResourceConnection');
    $connection= $this->_resources->getConnection();
    $tableName = $this->_resources->getTableName('otpp');

    $ckotp = $_POST["getotp"];

    $dates = date("Y-m-d");

        // SELECT DATA
    $sql = "SELECT * FROM otpp WHERE `otp`='$ckotp' AND `dates`='$dates'";
    $result = $connection->fetchall($sql);

    $cd = $result[0];

    $dc = $cd['otp'];

    if($dc == $ckotp){

        $om = \Magento\Framework\App\ObjectManager::getInstance();
        $customerSession = $om->get('Magento\Customer\Model\Session');
        if($customerSession->isLoggedIn()) {
            $customerId=   $customerSession->getCustomer()->getId();
            $sql = "INSERT INTO " . $tableName . "(phone, otp, dates,cust_id) VALUES ('$phone', '$randcode', '$dates', '$customerId')";

            echo "
";
            echo "Your mobile number verified";
            echo "
";
        }
    }
    else{
        echo "Invalid Otp";
    }

    $connection->query($sql);
}

}


texts: Cannot require customer group during registration in EE

texts: I'd like to require customers to select a group when creating an account. It seems that I should be able to from within the Manage Customer Attributes section but the form options I need to modify are disabled.


texts: Why won't getChildHtml Load on product view page?

texts:
I'm trying to load a custom block module tempate file onto the product_view page but it won't render itself.

Here is what I have tried:

I've declared my layout update inside my module config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Module>
            <version>0.1.0</version>
        </Company_Module>
    </modules>
    <global>
        <blocks>
            <module>
                <class>Company_Module_Block</class>
            </module>
        </blocks>
        <helpers>
            <module>
                <class>Company_Module_Helper</class>
            </module>
        </helpers>
        <models>
            <module>
                <class>Company_Module_Model</class>
                <resourceModel>module_mysql4</resourceModel>
            </module>
            <module_mysql4>
                <class>Company_Module_Model_Mysql4</class>
                <entities>
                    <posts>

module_posts

                    </posts>
                    <postsmeta>

module_postmeta

                    </postsmeta>
                </entities>
            </module_mysql4>
        </models>
        <resources>
            <module_setup>
                <setup>
                    <module>Company_Module</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </module_setup>
            <module_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </module_write>
            <module_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </module_read>
        </resources>
    </global>
    <frontend>
        <layout>
            <updates>
                <module>
                    <file>file.xml</file>
                </module>
            </updates>
        </layout>
    </frontend>
</config>

Then I have my layout file.xml

<?xml version="1.0"?>
<layout version="1.0">
    <catalog_product_view>
        <reference name="content">
            <reference name="product.info">
                <block type="module/classname" name="custom_name" template="company/module/file.phtml"/>
            </reference>
        </reference>
    </catalog_product_view>
</layout>

My block class

class Company_Module_Block_Classname extends Mage_Core_Block_Template {

    public function getText()
    {
        "Hello World"
    }

}

The my company/module/file.phtml

<?php $this->getText() ?>

When I try to load in my product view page I get an empty value??
<?php echo $this->getChildHtml('custom_name') ?>

Can someone show me what I have missed please??

EDIT

This works in the product view.phtml file but is this the correct way??

<?php   echo $this->getLayout()->createBlock('module/classname')->setTemplate('module/file.phtml')->toHtml();
 ?>


texts: i cannot login to admin account username password everything correct but cannot login please help

texts:
I am Not log in to admin account

Username And Password is Correct but cannot log

please help.


texts: How can I install the Azerbaijani language?

texts: Please help me create a new language. There is no Azerbaijani language in the database of Magento.


texts: How to change the price or currency switcher on home page in magento 1.9

texts:
I'm trying to change the product price on home page which is called from static block, In that price is not changed when we changed the price in home page but in list page and pdp page price showing on selected currency.

Before I wrote I also add a cahe_lifetime but not worked properly.

{{block type="bestseller/bestsellers" template="catalog/product/bestseller.phtml" cache_lifetime="1" }}


texts: How to do a list with all categories and subcategories, from a given main-category

texts:
I like to do a list with the name of all subcategories and sub subcategories from a giving main category.

I am really a bit new in Magento. But what I want to do, a list from all subcategories (name and url, as href) from the main category "Brands":

https://mag.outdoorequipped.com/

without the "All Brands" category but with those subcategories from "All Brands".

Any suggestions or link I can find some solution?


texts:
I'm trying to update Magento from 2.1.4 to 2.1.6 using composer.
But I'm getting this error:

  Problem 1
    - Installation request for magento/product-community-edition 2.1.6 -> satisfiable by magento/product-community-edition[2.1.6].
    - magento/product-community-edition 2.1.6 requires colinmollenhour/php-redis-session-abstract 1.2 -> no matching package found.

How can I fix this?


texts: How to change homepage based on cookies?

texts:
I have landing page when user hit the base URL

  example: http://127.0.0.1/footwear/

user will redirect to the landing page and there is link as

  ENTER THERE WEBSITE

once user click on enter there website its redirect to the main website .
I need to set cookies for particular time when user revisit the base URL landing page after particular time period so user can direct to the redirect to the main website not landing page.

how can achieve this ?
Thanks advance!


texts: Get data of the previous session issue - Magento1.9

texts:
I passed some data in session in success.phtml to get it in order_new.phtml email template, all goes well except the value that i get is that of the previous session !. I think the email it sends before I retrieve the data. Exemple: instead to get 104, i get 103.

Have you an idea how to handle this case.

success.phtml:

<?php Mage::getSingleton('core/session')->setData('my-code', $code); ?>

code.phtml

<?php Mage::getSingleton('core/session')->getData('my-code'); ?>

order_new.html:

<td>{{block type="core/template" area="frontend" template="email/code.phtml"}}</td>


texts: Magento Custom Block Methods Not Working

texts:
I've created a custom module in Magento but the methods I have defined for my block are not working for some reason. I can create an instance of the block in a template and call the parent blocks methods but not the methods I have defined.

/app/code/local/MyCompany/Morecategories/Block/List.php

<?php
class MyCompany_Morecategories_Block_List extends Mage_Core_Block_Template
{

  public function getMoreCategories() {
    return 'More categories';
  }
}

Then in my template file, if I run $this->getMoreCategories() it returns null.

I've tried running get_class($this), and it returns MyCompany_Morecategories_Block_List.

I've also run get_class_methods($this) but it only returned the parent blocks methods.

I can't imagine why my methods are not working.

Edit:  Here is my config.xml file for the module:

<?xml version="1.0"?>
<config>
  <modules>
    <MyCompany_Morecategories>
      <version>1.0.0</version>
    </MyCompany_Morecategories>
  </modules>
  <global>
    <blocks>
      <morecategories>
        <class>MyCompany_Morecategories_Block</class>
      </morecategories>
    </blocks>
  </global>
</config>

Edit 2: Here is the custom layout update xml code I have for the category

<reference name="content">
  <block type="morecategories/list" name="morecategories_list"   template="mycompany/catalog/category/more.phtml"/>
</reference>


texts: Checkout page Serialization failure: 1213 Deadlock found when trying

texts:
I'm using Magento 1.9.2 and I facing problem in my checkout page.

Deadlock and lock wait timeouts occur on more than 10 orders/sec.

Not sure what to do.

Can anyone help me to come out?


texts:
I am working in magento and now i face problem in getting my info.I created collection to fetch data , but now i want to check some value if exist i want to add new inner join to that collection.I try following code but not succeeded.

$collection = Mage::getModel('mymodule/model')->getCollection();
        if($this->getRequest()->getParam('order_id')!=''){
          $collection->addFieldToFilter('main_table.order_id',$orderid);
        }
        if($user_id!='' && $user_id !='0'){
        $collection->addFieldToFilter('main_table.t_customer_id',$user_id);
    }

        $collection->getSelect()
            ->columns('count(resp.r_ticket_id)-1 AS total_replies')
            ->joinLeft(array('dpt' => Mage::getSingleton('core/resource')->getTableName('hd_departments')),
                    'main_table.t_department_id = dpt.departments_id')
            ->joinLeft(array('ts' => Mage::getSingleton('core/resource')->getTableName('hd_ticketstatus')),
                        'main_table.t_status_id = ts.ticketstatus_id')
            ->joinLeft(array('pr' => Mage::getSingleton('core/resource')->getTableName('hd_priorities')),
                        'main_table.t_priority_id = pr.priorities_id')
                ->joinLeft(array('resp' => Mage::getSingleton('core/resource')->getTableName('hd_tickets_responses')),
                        'resp.r_ticket_id = main_table.ticket_id')

                ->group('main_table.ticket_id');

Now i want to add new join on condition basis.My condition and join are as :

 if($user_id == '0' && $this->getRequest()->getParam('id')!='')
  {
      $results = Mage::helper('mymodule')->getvisitorname($this->getRequest()->getParam('id'),'email');

      if(sizeof($results) > 0){
       $collection = $collection->getSelect('*')->joinInner(array('ureg' => Mage::getSingleton('core/resource')->getTableName('unregistereduser')),
              'main_table.ticket_id = ureg.ticket_id');

      }

But this doesn't work.how can i embed this condition to collection ? Thanks
      }


texts: Magento image upload error from Admin 1.9.2.3

texts:
This question is regarding image upload problems in back-end only :

Problem 1:

I cannot Upload image from the Magento Admin panel(live sever) , some times im getting error:

SSL Error: Invalid or self-signed certificate

sometimes :

No error upload progress halts between 50 - 100 %
the image upload progress just halt at 100%
Image uploads perfectly
http error

Im uploading the image without any third party module/extension
i had found lot of questions regarding SSL error while googling.But none of this solved my problem.

I had changed permission of media,var & tmp folder(including sub folders) permission to 775.
The Same project is working perfectly on localhost.

Problem 2:

I cannot find the image preview for the images that are newly uploaded

After inspecting the source i found there is no image uploaded here:

 /media/tmp/catalog/product/h/a/some-image.jpg

But there is no issues with images on frontend

I believe that these two problem has some relation together. I had recently upgraded from 1.7


texts: Extending/Overriding base JavaScript in Magento 2

texts:
AFAIK, the mage.confirm widget is defined in this file:

vendor/magento/module-ui/view/base/web/js/modal/confirm.js

I'm looking to override the file in my theme to provide alternative default behaviour for confirm modals (e.g. the one displayed in M2 when removing an item from the minicart).

I've tried to customise the widget following the steps in the FE dev docs without success. Is it possible to override this base file?


texts:
I created a default.xml file at \app\design\frontend\nitish\Lucowatch\Magento_theme\layout and add the following code

<?xml version="1.0"?>
  <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <css src="css/styles-m.css" />
    <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
    <css src="css/print.css" media="print" />
    <css src="css/bootstrap.min.css" media="print" />
    <css src="css/font_family.css" media="print" />
    <css src="css/mystyle.css" media="print" />
    <css src="css/theme.css" media="print" />
</head>

but I did not find css when I go on home page


texts: Price filter not showing proper price range in Magento 1.7

texts:
Magento price filter on category page not showing proper price range on some category pages.

We have set price range Rs.1000 from magento admin section. Most of the categories are showing perfect product price range. For example

$ 0 - $ 1k
$ 1k - $ 2k
$ 2k - $ 3k

But some are showing categories it price range is coming Rs10k. For example

$ 0 - $10k
$ 10k - $20k

Please help me with this. If anyone have any idea.


texts:
When I hit the website URL then it shows below security error:

  The site ahead contains malware Attackers currently on example.com
  might attempt to install dangerous programs on your computer that
  steal or delete your information (for example, photos, passwords,
  messages, and credit cards).

I am using 1.9.0.1


texts: Stock status in product grid not displayed when not set

texts:
What I want to achive is, to show one column in the catalog grid, which contains the stock status.

Here is my code for adding it to the collection that:

    $collection->joinTable( 'cataloginventory/stock_status','product_id=entity_id', array("stock_status" => "stock_status") )
        ->addAttributeToSelect('stock_status');

I also add a new column:

    $this->addColumn('stock_status',
         array(
            'header'=> 'Stock Status',
            'width' => '60px',
            'index' => 'stock_status',
            'type'  => 'options',
            'options' => array('1'=>'In Stock','0'=>'Out Of Stock'),
    ));

The Problem now is that if no stock status is set, there is no entry in the db-table cataloginventory_stock_status. This also means, that products which have no stock status set will not even be displayed in this new catalog grid.

Is there a way to display them anyway?


texts: Fatal error: Class 'Mage_Blog_Helper_Data' not found in /home/teamgack/public_html/lafzz.com/app/Mage.php on line 547

texts:
Whenever i click to System->Configuration then above error is displayed. What should i do to resolve it.

Please help me out.


texts: Magento 1.9 Catalog Search result redirect the live website

texts:
I am trying to find where I did mistake when I search abc in catalog search tab. the link local.xyz.com/abc.html Redirect to www.xyz.com/abc.html.
Don't know where I did mistake, I already changed the url rewrite manage ment and reindex in and remove cache but same issue occur.


texts: Remove or unset super attribute from cart in magento

texts:
I have been trying to remove or unset super attribute (configurable product) on cart page which have null value.

I have attached screen shot

I have two option color and premium colors if i get color option value null than it will remove from cart programatically and also remove from sales order.

Can anyone please help me.


texts: How to create CUSTOM extension in magento 2.1.6?

texts:
I was confusing among extensions and modules.

Can anyone guide me about it and i am looking for good tutorial for creating extensions in magento 2.1.6. ?


texts:
How To Resolve Magento ReIndexing Errors In Magento 1.9.1 Store please find the below image

When I reindex product prices it is showing below error

  There was a problem with reindexing process.
  SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1, query was: INSERT INTO `catalog_product_index_price_final_idx` SELECT `inner`.`entity_id`, `inner`.`customer_group_id`, `inner`.`website_id`, `inner`.`tax_class_id`, `inner`.`orig_price`, `inner`.`price`, `inner`.`min_price`, MAX(inner.max_price) AS `max_price`, `inner`.`tier_price`, `inner`.`base_tier` FROM (SELECT e.entity_id AS `entity_id`, pi.customer_group_id AS `customer_group_id`, cw.website_id AS `website_id`, pi.tax_class_id AS `tax_class_id`, pi.price AS `orig_price`, pi.final_price AS `price`, pi.final_price AS `min_price`, pi.final_price AS `max_price`, pi.tier_price AS `tier_price`, pi.tier_price AS `base_tier` FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_super_link` AS `l` ON l.parent_id = e.entity_id INNER JOIN `catalog_product_entity` AS `ce` ON ce.entity_id = l.product_id INNER JOIN `catalog_product_index_price_idx` AS `pi` ON ce.entity_id = pi.entity_id INNER JOIN `core_website` AS `cw` ON pi.website_id = cw.website_id INNER JOIN `core_store_group` AS `csg` ON csg.website_id = cw.website_id AND cw.default_group_id = csg.group_id INNER JOIN `core_store` AS `cs` ON csg.default_store_id = cs.store_id AND cs.store_id != 0 CROSS JOIN `cataloginventory_stock` AS `cis` LEFT JOIN `cataloginventory_stock_item` AS `cisi` ON cisi.stock_id = cis.stock_id AND cisi.product_id = ce.entity_id LEFT JOIN `catalog_product_entity_int` AS `tad_status` ON tad_status.entity_id = ce.entity_id AND tad_status.attribute_id = 84 AND tad_status.store_id = 0 LEFT JOIN `catalog_product_entity_int` AS `tas_status` ON tas_status.entity_id = ce.entity_id AND tas_status.attribute_id = 84 AND tas_status.store_id = cs.store_id INNER JOIN `cataloginventory_stock_status` AS `ciss` ON ciss.product_id = e.entity_id AND ciss.website_id = cw.website_id WHERE (e.type_id='configurable') AND (ciss.stock_status = 1) ORDER BY IF(IF(cisi.use_config_manage_stock = 0 AND cisi.manage_stock = 0, 1, cisi.is_in_stock), 1, 0) DESC, pi.final_price ASC, pi.price ASC) AS `inner` GROUP BY `inner`.`entity_id`, `inner`.`customer_group_id`, `inner`.`website_id` ON DUPLICATE KEY UPDATE `tax_class_id` = VALUES(`tax_class_id`), `orig_price` = VALUES(`orig_price`), `price` = VALUES(`price`), `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`), `tier_price` = VALUES(`tier_price`), `base_tier` = VALUES(`base_tier`), `group_price` = VALUES(`group_price`), `base_group_price` = VALUES(`base_group_price`)`

How to rectify this issue?


texts: I have added a dropship extension to my Magento and it is asking for the following. "Attribute code for your vendor attribute. Must be a dropdown attribute." Please help... is this a particular code?


texts: Magento 1.x : Custom emails sent by cronjob returning admin store url instead of store base url

texts:
Here is how I'm sending emails from my multi-site magento 1.9.2.4, this function is called by a cron job & working fine to send emails.

Everything is working fine but all of the emails templates (there are different templates for different wesbsites/stores) have store url of admin. I don't know why {{store url=""}}" & "{{config path="web/secure/base_url"}} are returning admin store url instead of the Store Id I'm setting to template

public function sendEmail($templateId, $vars,$storeId ,$name, $email)
{
    try {

        $from_email     = Mage::getStoreConfig('trans_email/ident_general/email',$storeId); //fetch sender email Admin
        $from_name      = Mage::getStoreConfig('trans_email/ident_general/name',$storeId); //fetch sender name Admin
        $emailTemplate  = Mage::getModel('core/email_template');
        $emailTemplate->setStoreId($storeId);
        $emailTemplate->load($templateId);

        $emailTemplate->setSenderName($from_name);
        $emailTemplate->setSenderEmail($from_email);

        foreach ($vars as $key => $value) {
            $emailtemplateVariables[$key]  = $value;
        }

        $result = $emailTemplate->send($email, $name, $emailtemplateVariables);

        Mage::log("Template Id : ".$templateId." send result : ".$result,null,"T-Emails.log");

    } catch(Exception $ex) {
        Mage::log($ex->getMessage(), null,"T-Emails.log");
    }

    return $result;
}

Thanks


texts: Move additional attributes below short description

texts:
I want to move additional infos below short description.
I found this:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="product.attributes" destination="product.info.main" after="product.info" />
        <move element="product.info.overview" destination="page.main.title" />
    </body>
</page>

which works fine in "catalog_product-view.xml, but sets additional infos below cart button.
What is the right way, to solve this?


texts: Magento 2: How to add prodcut into cart and then get them?

texts:
Magento version: 2.0.0

How to add the product into shopping cart? How about this work-flow? and then, how to get the products of shopping cart?


texts: Extension that is free to download but has a monthly payement

texts:
I've seen this question asked a few times without a direct answer, hoping I can get some clarity.

If we build an extension thats free to download but charges a monthly fee, how does magento receive their revenue share? Do we bill the customer, collect payment then square up with Magento or is it he other way around?