texts: Shipping restrictions based on groups of products

texts:
I’m building a website where a customer can customize and order a shed that will be delivered to their home.  The client has restrictions based on delivery:

A. There is a 30 mile free delivery range from their shop.

For sheds not exceeding 13’ at roof edge, it will be $2.75 per loaded mile after 30 miles.
For another set of sheds it will be $4.50 per loaded mile after 30 miles.
For another set, $5.75 per loaded mile after 30 miles.
For another set, $7.75 per loaded mile after 30 miles.

B. Also, the customer is responsible for an “escort” in 2 states (MD & WV):

MD permits up to 10’ wide - $30
MD permits over 10’ wide - $55
WV permits all buildings - $30

I need to know if their are currently any extensions that could handle both A & B.  If not, at least A.

Thank You,
Andy


texts: Adding a custom attribute to Sales order grid

texts:
I have created a custom attribute which is the customer account reference and we set this in the back end through the customer page. However we need to add this to the Sales order grid as well. I created my Attribute using this:
http://codemagento.blogspot.co.uk/

This is my sql file:

<?php

$installer = $this;

$installer->startSetup();

$this->addAttribute('customer', 'accref', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'Account Reference',
    'global' => 1,
    'visible' => 1,
    'required' => 1,
    'user_defined' => 1,
    'default' => null,
    'visible_on_front' => 1
));

if (version_compare(Mage::getVersion(), '1.6.0', '<=')) {
    $customer = Mage::getModel('customer/customer');
    $attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId();
    $this->addAttributeToSet('customer', $attrSetId, 'General', 'accref');
}

if (version_compare(Mage::getVersion(), '1.4.2', '>=')) {
    Mage::getSingleton('eav/config')
            ->getAttribute('customer', 'accref')
            ->setData('used_in_forms', array('adminhtml_customer', 'customer_account_create', 'customer_account_edit', 'checkout_register'))
            ->save();
}

$installer->endSetup();

i have tried many things for example adding

$this->addColumn('accref', array(
            'header' => Mage::helper('sales')->__('Account Reference'),
            'index' => 'accref',
        ));

to a copied version of code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php in the _prepareColumns()function.

But nothing is displaying in the sale order grid.


texts: add to cart not working in magento with configurable products

texts:
I'm working on configurable product which contain drop down as Custom , Small, Medium, Large etc i want to add certain text box when user click Custom option which I had achieved using CSS and jQuery functionality is working well with different drop down but add to ca rt is not working with Custom option
I'm attaching code to achieve goal can

<?php $_option = $this->getOption(); ?>

<label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '*' ?><?php echo  $this->escapeHtml($_option->getTitle()) ?>
    <?php echo $this->getFormatedPrice() ?>

<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>

    <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?>
        <input type="text" onchange="opConfig.reloadPrice()" id="options_<?php echo $_option->getId() ?>_text" class="input-text<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" value="<?php echo $this->escapeHtml($this->getDefaultValue()) ?>" />

            <?php $img= Mage::getModel('newdashboard/newdashboard')->getCollection()->getFirstItem();
                $img->getFilename();
             ?>
        <img width = '40' height = '40'src = "<?php echo '/media/' . DS . $img->getFilename()?>"/>
    <?php elseif ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?>
        <textarea id="options_<?php echo $_option->getId() ?>_text" onchange="opConfig.reloadPrice()" class="<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" rows="5" cols="25"><?php echo $this->escapeHtml($this->getDefaultValue()) ?></textarea>
    <?php endif; ?>
    <?php if ($_option->getMaxCharacters()): ?>

<?php echo Mage::helper('catalog')->__('Maximum number of characters:')?> <?php echo $_option->getMaxCharacters() ?>

    <?php endif; ?>

does anyone has solution for this issue


texts: Is magento enterprise is available in free?

texts: Is it possible to download Magento Enterprise edition for free? If it can anyone share the link or if it is paid download means where I can get the details. Please share any links for details.


texts:
I'm trying to override the module-catalog/Block/Product/View/Options/Type/Select.php class with a new version which includes a few other bits of custom php. I have done the below and then run the php bin/magento setup:upgrade and php cache:clean commands but the product page is showing a blank/white page.

I created a 'code' folder and placed it here:

/app/code/

I created a Vendor folder titled 'Mike' and placed it here:

/app/code/Mike/

Within the new Mike vendor folder, I created an etc folder: /app/code/Mike/etc/. Within this etc folder, I have added a di.xml file containing the below:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Block\Product\View\Options\Type\Select" type="Mike\NewSelect\Block\Product\View\Options\Type\Select" />
</config>

I then created a Module folder titled NewSelect and placed it in the Mike vendor folder:

/app/code/Mike/NewSelect/

I then just copied over the directory structure (without the containing files, except for Select.php) of the core Select class and placed it in the NewSelect module folder, resulting in the below:

app/
├── Mike/
│   ├── NewSelect/
│   │   ├── Block/
│   │   │   ├── Product/
│   │   │   │   ├── View/
│   │   │   │   │   ├── Options/
│   │   │   │   │   │   ├── Type/
│   │   │   │   │   │   │   ├── Select.php
│   │   ├── etc/
│   │   │   ├── di.xml

Within my new Select class (app/code/Mike\NewSelect\Block\Product\View\Options\Type\Select.php), I have extended the core Select class with the following:

namespace Mike\NewSelect\Block\Product\View\Options\Type;

class Select extends \Magento\Catalog\Block\Product\View\Options\Type\Select
{
 /**
     * Return html for control element
     *
     * @return string
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
etc etc...

In my Mike/MyTheme/Magento_Catalog/catalog_product_view.xml file, I have updated the calling block:

<block class="Magento\Catalog\Block\Product\View\Options\Type\Select" as="select" template="product/view/options/type/select_hamper.phtml"/>

and changed it to:

<block class="Mike\NewSelect\Block\Product\View\Options\Type\Select" as="select" template="product/view/options/type/select.phtml"/>

Can anyone see where I'm going wrong?

Thank you


texts:
I am trying to learn extension development using the official guide and I am confused with the use of different cases for naming different files and folders.

For instance, the proposed structure for the extension has been shown as:

What I notice is that the folders for Blocks, Models and Helpers are named starting with a Capital letter but the folders data, etc, sql and controller begin with small letters.

I find this inconsistency uncomfortable.

Further down the book, a file is named Magentostudy_news.xml but is then later referenced in config.xml as :

<layout>
  <updates>
    <magentostudy_news>
      <file>magentostudy_news.xml</file>
    </magentostudy_news>
  </updates>
</layout>

Note the inconsistency in file name capitalization.

I read that Magento favors configuration over convention but this inconsistency is kind of unnerving.

My question is this :
Can I have arbitary names, say use Controller instead of controller for sake of consistency ?


texts: Sharing view languages across stores module

texts:
I'm having the following problem. Take a look at my demo store configuration.

www.store1.com
    store 1
             language 1
             language 2
    store 2
             language 2
             language 3

www.store2.com
    store 3
             language 1
             language 3
    store 4
             language 2
             language 5

These stores / languages share products. They also share language. I'm looking for a way to define 1 language across all the views who have this product. So i'm talking about translation of a product by selecting the store or view. Now my client have to add this translations double which is a bit annoying.

So if i add a product language at store1.com -> store 1 -> language 2 it should be available at store2.com -> store 4 -> language 2.

I have seen all the posts about creating a custom modules or working with observers and so on but i'm looking for an existing solution. And i know they are around i just can't find it anymore. I have seen it before. Anyone knows what i mean? Or maybe some other suggestion on doing this without spending too much time?


texts: Unable to add magento-ecg/coding-standard to PHP_CodeSniffer:

texts:
Unable to install magento-ecg/coding-standard to PHP_CodeSniffer:
Tried below command after cloning PHP_CodeSniffer from github:

phpcs --config-set installed_paths ./vendor/magento-ecg/coding-standard

But phpcs -i is showing only following standards.

  The installed coding standards are PSR1, MySource, Zend, Squiz, PHPCS,
  PEAR and PSR2


texts:
I'm trying to figure out why Magento 2 Search is working that way. My products have SKUS like 111-222-333.
When i'm trying to search by SKU, magento 2.4 returns a product collection of ther product sku i've search ( at first position ) , and after that a lot of other similar products ( i suppose ).
Is there a way to override the search functionality or some setting in order for the search query to return only one result, if the given term matches an sku?
I've already investigated the search modules with no luck at all
PS Magento 2.4 uses only Elasticsearch


texts: Create magento pagination in custom product collection inside phtml file

texts:
First of all, i didn't create custom module to handle this product collection, so, i just put model inside phtml file, i know it's bad implementation, i'm new in magento and i have to do small customization in loading product collection to the extension that bought by client.

This product collection is only showing up in specific category, so inside custom design tab in category management, i put this code :

<reference name="product_list">
<action method="setTemplate"><template>catalog/product/list_all.phtml</template></action>

And here is my query to load product collection, this query is inside list_all.phtml file :

$collection = Mage::getResourceModel('catalog/product_collection')
            ->addAttributeToSelect('*')
            ->addStoreFilter()
            ->addUrlRewrite()
            ->addAttributeToFilter('groupdeal_status', Devinc_Groupdeals_Model_Source_Status::STATUS_RUNNING)
            ->joinField('groupdeals_id','groupdeals/groupdeals','groupdeals_id','product_id=entity_id',null,'left');
    $collection->getSelect()->limit(2);

i've used this code to generate the pagination :

    $toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
    $toolbar->setCollection($collection);
    echo $toolbar->toHtml();

the code above only showing the products count and show per-page options, not 1,2,3..., links, i've also tried to use the code below :

<?php
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();

$toolbar->setCollection($collection);
echo $toolbar->getCollection()->getSize().'------'.var_dump($toolbar->getPages());
?>

but, the var_dump returning NULL values. Should i create custom module to do this? or is there any ways to do this way, without creating custom module?? I've been trying to find a solutions about this, but most of the solution is using custom module.


texts: Set new template file in XML based on other template

texts:
I created a new template file, where I placed some custom code, that I want to load inside a page.

I created a CMS page where I load the template file by using:

{{block type="core/template" template="/aw_blog/share.phtml"}}

I need to use the same php code as the default template file, so I need to define the template by: <?php $post = $this->getPost();?>

The default template file is defined inside the XML file like:

    <reference name="content">
        <block type="blog/post" name="post" template="aw_blog/post.phtml">
            <block type="blog/product_toolbar" name="aw_blog_list_toolbar" template="aw_blog/toolbar.phtml">
                <block type="blog/html_pager" name="product_list_toolbar_pager"/>
            </block>
        </block>
    </reference>

So I edit the XMl file:

    <reference name="content">
        <block type="blog/post" name="post" template="aw_blog/post.phtml">
            <block type="blog/product_toolbar" name="aw_blog_list_toolbar" template="aw_blog/toolbar.phtml">
                <block type="blog/html_pager" name="product_list_toolbar_pager"/>
            </block>
        </block>
        <block type="blog/post" name="post" template="aw_blog/share.phtml">
            <block type="blog/product_toolbar" name="aw_blog_list_toolbar" template="aw_blog/toolbar.phtml">
                <block type="blog/html_pager" name="product_list_toolbar_pager"/>
            </block>
        </block>
    </reference>

But that does not work, because that breaks down the page. It does not load the default content anymore.

What am I missing?


texts: customer_register_success not triggered after successful registration

texts:
I would like to send an sms on every successful registration. Below is my code. But I am not sure whether the method is triggered after successful registration.

app\etc\modules\Php_Sms.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Php_Sms>
            <active>true</active>
            <codePool>local</codePool>
            <version>0.0.1</version>
        </Php_Sms>
    </modules>
</config>

Inside local code pool, I have created namespace as Php and module as Sms.

code\local\Php\Sms\etc\config.xml as below

    <config>
    <modules>
        <Php_Sms>
            <version>0.0.1</version>
        </Php_Sms>
    </modules>
    <global>
        <events>
            <customer_register_success>
                <observers>
                    <Php_Sms_customer_register_success>
                        <type>singleton</type>
                        <class>Php_Sms_Model_Observer</class>
                        <method>customerRegisterSuccess</method>
                    </Php_Sms_customer_register_success>
                </observers>
            </customer_register_success>
        </events>
    </global>
</config>

code\local\Php\Sms\Model\Observer.php as below

 <?php
class Ucs_GlobalSms_Model_Observer {
  public function customerRegisterSuccess(Varien_Event_Observer $observer) {
      $event = $observer->getEvent();
      $customer = $event->getCustomer();
      $email = $customer->getEmail();
          Mage::log('Successfully logged in', null, 'mylogfile.log');

      if($email) {
      }
  }
}
?>

Mage\customer\controllers\AccountController.php

/**
 * Dispatch Event
 *
 * @param Mage_Customer_Model_Customer $customer
 */
protected function _dispatchRegisterSuccess($customer)
{
    Mage::log('Successfully logged in'.$flag, null, 'syncProduct.log');
    Mage::dispatchEvent('customer_register_success',
        array('account_controller' => $this, 'customer' => $customer)
    );
}

But mylogfile.log is not at all creating. I guess customerRegisterSuccess is not triggered, should I do something to enable _dispatchRegisterSuccess method?

My questions are,

Will magento log work on Observer.php?
How to know whether my custom method triggered?
Why my sms is not sending? (No issues with SMS api. It works fine in core php file)


texts:
I am using magento ce 1.9.1 and the latest version of aoe scheduler (v0.4.3) from https://github.com/AOEpeople/Aoe_Scheduler/tags, because the version from here:
http://www.magentocommerce.com/magento-connect/aoe-scheduler.html isn't the latest.

But for a few days the timeline view seems to be crashed and looking weird:

The list view is just working, only the timeline view looking weird. I tried to reinstall again and again and flushed all caches too, but without an effect.

Any suggestions to fix this?


texts:
I am getting error like below while I am trying to import product as CSV in Magento 2 Admin Panel.

My Import screen is like below.

UPDATE

I am getting new error now.


texts: Get latest quote data by customer id or e-mail

texts: I want to retrieve the latest quote and quote items that hasn't been checked out only by using customer id or customer e-mail, is there a way to do this?


texts: None of Custom Payment Module are visible in the Checkout

texts: I'm using magento version 2.2.5. Previously in version 2.1 custom payment methods were visible in checkout. But when deployed in version 2.2.5 none of the custom payment methods are visible. Even payment methods like paypal, stripe , square.


texts: Magento 2 - Add body class on user login

texts:
I'd like to add a specific body class when a user login to my Magento 2 store.
My goal is to add a class depending on customer group, so I can show/hide some infos easily via CSS.

Currently I can't solve this, please, could you give me some advice?

Thanks in advance


texts: Magento 2 : Change Number of Items Per Row set From Admin for Different Categories

texts:
I'm trying to change number of items per row in product listing page.

I want to set different items per row for differant categories from: "admin panel > category > design > layout update xml"

Magento 1, Like this : < action method="setColumnCount"> < count> 4 < /count>< /action>

Above code I want to use in magento 2.


texts:
I have InstallSchema.php as follows:

<?php
namespace Namespace\Module\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;

use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class InstallSchema implements InstallSchemaInterface
{
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $table = $setup->getConnection()->newTable(
            $setup->getTable('custom_table')
        )->addColumn(
            'custom_id',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            'Custom Id'
        )->addColumn(
            'name',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            [],
            'Custom Name'
        )->setComment(
            'Custom Table'
        );
        $setup->getConnection()->createTable($table);

        $setup->endSetup();
    }
}

InstallData.php as follows:

<?php

namespace Namespace\Module\Setup;

use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

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

        $tableName = $setup->getTable('custom_table');

            $data = [
                [
                    'name' => 'Content of the first post.',
                ],
                [
                    'name' => 'Content of the second post.',
                ],
            ];

            $setup
                ->getConnection()
                ->insertMultiple($tableName, $data);

        $setup->endSetup();
    }
}

I have executed php bin\magento setup:upgrade at time of installing.

What I found was Table with defined Schema was created but no data was inserted.

Please help what I am missing here.


texts: We're unable to send the password reset email in Magento 2

texts:
When i try to reset my password by using forgot password link, i get this error.

We're unable to send the password reset email


texts:
I'm using Magmi version: 0.7.18  to update price of products. While the initial import of the products was successful, updating the price of the some products is not reflected in the backend.

Do i need to reindex  catalog_product_price ? or reindex all ?


texts:
I want to change the text "Zip/Postal Code" in customer admin form to "PIN Code". Where is the file location to make this change? I have enabled admin path hints. Is it possible to change the text using translation file.

Please help..


texts:
When I try to access localhost/magento/setup this window is shown

  Fatal error: Uncaught Exception: Deprecated Functionality: The each()
  function is deprecated. This message will be suppressed on further
  calls in
  C:\xampp\htdocs\magento\vendor\colinmollenhour\cache-backend-file\File.php
  on line 81 in
  C:\xampp\htdocs\magento\vendor\magento\framework\App\ErrorHandler.php:61
  Stack trace: #0 [internal function]:
  Magento\Framework\App\ErrorHandler->handler(8192, 'The each()
  func...', 'C:\xampp\htdocs...', 81, Array) #1
  C:\xampp\htdocs\magento\vendor\colinmollenhour\cache-backend-file\File.php(81):
  each(Array) #2
  C:\xampp\htdocs\magento\vendor\magento\zendframework1\library\Zend\Cache.php(153):
  Cm_Cache_Backend_File->__construct(Array) #3
  C:\xampp\htdocs\magento\vendor\magento\zendframework1\library\Zend\Cache.php(94):
  Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4
  C:\xampp\htdocs\magento\vendor\magento\framework\App\Cache\Frontend\Factory.php(156):
  Zend_Cache::factory('Magento\Framewo...', 'Cm_Cache_Backen...',
  Array, Array, true, true, true) #5 C:\xampp\htdocs\magent in
  C:\xampp\htdocs\magento\vendor\magento\framework\App\ErrorHandler.php
  on line 61


texts: Filter admin grid based on the url parameter

texts:
In Magento 2.2.5, I have a custom agrid. It has edit option and url parameters.

I need to create another grid in the edit page based on the url parameter. ie., I need to filter the custom grid based on the url parameter.

Note: Am not using ui component to create grid.

Code: https://pastebin.com/z9aww705


texts: SoapSerializationEnvelope error in android app code

texts:
I am new to Magento SOAP api  , and i am just fetching the session ID by giving the correct user name and API key  in my android application . But i am getting error in this following line .

            androidHttpTransport.call("", env);

I have given Internet Permission to my android code and this is the code i am trying with . and I am using KSoap2 android external JAR file and I have added it to my build path .

Please help me

public class MainActivity extends Activity {
private static final String NAMESPACE = "urn:Magento";
private static final String URL = "http://127.0.0.1/index.php/api/v2_soap/";
@Override
protected void onCreate(Bundle savedInstanceState) {
    try {
        SoapSerializationEnvelope env = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);
        env.dotNet = false;
        env.xsd = SoapSerializationEnvelope.XSD;
        env.enc = SoapSerializationEnvelope.ENC;
        SoapObject request = new SoapObject(NAMESPACE, "login");
        request.addProperty("username", "cats");
        request.addProperty("apiKey", "sudhir123");
        env.setOutputSoapObject(request);
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
        androidHttpTransport.call("", env);
        Object result = env.getResponse();
        Log.d("sessionId", result.toString());
    } catch (Exception e) {
        e.printStackTrace();
    }
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

}


texts: Magento 2 Braintree Payment Method Error For Second Website

texts:
I've set 2 websites us and uk.

Signed up for Braintree sandbox account.

Created 2 Merchant Account ID.

1- uk_maid.

2- us_maid.

Magento admin Stores->Configuration->Sales->Payment Method on the left changed  Store View: uk_website then configured Braintree entered all details plus Merchant ID = uk_maid saved.

Again same process as above but Merchant ID will be us_maid:

Magento admin Stores->Configuration->Sales->Payment Method on the left changed  Store View: us_website then configured Braintree entered all the details and Merchant ID = us_maid saved.

Placed order in uk website everything works payment were taken and appear in my sanbox Braintree dashboard under the uk_maid which is set to default.

Now using us website in ../checkout/#payment as soon as check radio box Braintree as payment option :

In console:

I don't get it why can't use alternative merchant id for us website?

Is this a bug? Anyone have had this set up any experienced the issue?
Thanks.


texts: Change sort order for bundle selected product by name magento

texts:
I want to sort magento bundle product selected sort order on magento admin.i have changed below code file but nothing happen.i don't know from where it collect collection of product so i can set order. I have set order on this function but nothing changed.

Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option

    public function getOptions()
{
    if (!$this->_options) {
        $this->getProduct()->getTypeInstance(true)->setStoreFilter($this->getProduct()->getStoreId(),
            $this->getProduct());

        $optionCollection = $this->getProduct()->getTypeInstance(true)->getOptionsCollection($this->getProduct());

        $selectionCollection = $this->getProduct()->getTypeInstance(true)->getSelectionsCollection(
            $this->getProduct()->getTypeInstance(true)->getOptionsIds($this->getProduct()),
            $this->getProduct()
        );

        $this->_options = $optionCollection->appendSelections($selectionCollection);
        if ($this->getCanReadPrice() === false) {
            foreach ($this->_options as $option) {
                if ($option->getSelections()) {
                    foreach ($option->getSelections() as $selection) {
                        $selection->setCanReadPrice($this->getCanReadPrice());
                        $selection->setCanEditPrice($this->getCanEditPrice());
                    }
                }
            }
        }
    }

    return $this->_options;
}


texts: Magento 1.9 observer not activating on event

texts:
I have an observer I want to run when the following event is triggered:<sales_quote_address_collect_totals_after>

I am basing my configuration on this:
How to create an new observer on the event catalog_product_save_before

I have setup my config file as follows:

app/etc/modules/DBCustom_Sales.xml

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

app/code/local/DBCustom/Sales/etc/config.xml

 <config>
    <modules>
        <DBCustom_Sales>
            <version>0.1.0</version>
        </DBCustom_Sales>
    </modules>
    <global>
        <models>
            <sales>
                <rewrite>
                    <order_shipment>DBCustom_Sales_Model_Order_Shipment</order_shipment>
                    <order>DBCustom_Sales_Model_Order</order>
                </rewrite>
            </sales>
        </models>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <dbcustom_sales before="Mage_Adminhtml">DBCustom_Sales_Adminhtml</dbcustom_sales>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
    <events>
        <sales_quote_address_collect_totals_after>
            <observers>
                <dbcustom_sales>
                    <type>singleton</type>
                    <class>dbcustom_sales/observer</class>
                    <method>setShippingCost</method>
                </dbcustom_sales>
            </observers>
        </sales_quote_address_collect_totals_after>
    </events>
</config>

I have the path to the observer as follows:
app/code/local/DBCustom/Sales/Model/Observer.php

class DBCustom_Sales_Model_Observer{
    public function setShippingCost($observer){
        $test = '';

    }
}

I am using PHPStorm with breakpoints setup on the $test variable so if the observer is active, it should break at $test, but it currently does not break on $test. I have cleared the site cache multiple times, and have confirmed that the event is being triggered, but nothing happens here. Any help is appreciated.


texts: ERROR coming while adding product through admin panel

texts:
After clicking on the add product, an error occurred during application run.

Please see the below exception log for details:

Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded {"exception":"[object] (InvalidArgumentException(code: 0): Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded at /Applications/MAMP/htdocs/Magento2_3/vendor/magento/framework/Serialize/Serializer/Json.php:26)"} []


texts: Make custom link in customer account navigation visible to certain customers only

texts:
How can I make a custom link in customer account navigation visible to certain customers only?

Example: I have a link labeled "Ticket management". If a user clicks on that he is redirected to a page where he can view and edit tickets. I want only display this link to customers that have a certain custom variable set.

Can I specify this in customer_account.xml or somewhere else?

This is my customer_account.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-tickets-link">
                <arguments>
                    <argument name="path" xsi:type="string">ticket_module/index/display</argument>
                    <argument name="label" xsi:type="string">Tickets</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>


texts: How to limit 5 maximum images each product in Magento2.3?

texts: I want to limit 5 images per product. Admin can't able to upload more than 5 images. How can I achieve this?


texts: Magento2 How to get PHPSESSID value of Guest User?

texts:
Magento2 How can I get PHPSESSID value for Guest User?
I need to use it to identify frontend user in PWA, using the rest API


texts:
I have a cron job running every 10 minutes. If I call the function anywhere else, the script finishes running within ~5 minutes errorless and does what it is supposed to do.

When looking into the timeline view of AOE Scheduler however, I see all cron jobs of this kind not finishing.

There's no error in any log file and as I said, the script itself does not throw errors. What could this all be about?


texts: getGalleryImages returning NULL in Magento homepage

texts:
We've extended a homepage slider for a client so that they can feature products in this space.

As part of this, there are three image slots where we wish to get the products' main image and then two images from the media gallery (ideally randomly but not the end of the world if by ID).

To get a better understanding, please see screenshot of what we have so far:-

We're building the collection for this module using the following:-

$featured_products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->AddAttributeToFilter('featured', array('eq' => 1));

Getting the product's main image is no problem, this is working perfectly with the following:-

<img class="gallery" src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(225); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" />

And it is simple enough to make all three image slots use this main image as shown in the image above.

When we try to call getGalleryImages however, this always returns NULL (example such as):-

<?php if (count($this->getGalleryImages()) > 0): ?>
<?php foreach ($this->getGalleryImages() as $_image): ?>
<img class="gallery" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(100); ?>" width="100" height="100" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
<?php endforeach; ?>
<?php endif; ?>

Please could someone advise of the best approach to call the gallery images on the homepage. Is there something we can include to the collection build or would we need to add an observer.

Thanks in advance.


texts: Hide products with no images on frontend

texts:
Is it possible to programmatically hide products on the front end that has no image?

Running Magento 2.3.


texts: Manipulate customer grid column data in csv(export)

texts:
I added a custom column in customer grid i.e subscriber_status which is showing correctly. In DB the actual value saved as either 1(subscribed) or 3(unsubscribed).

Currently I am able to manipulate data i.e 1 as YES and 3 as NO text which
I am displaying in my custom column but when I am exporting CSV data is displaying as 1 or 3 .

But I want it to show either YES or NO in CSV.


texts: Magento 1 : Filtering / Paging / Sorting with Varien_Data_Collection

texts:
I'm back to this good old problem where using a Varien_Data_Collection in a grid does not handle sorting, paging nor filtering.

I've found some useful resources such as :

https://www.maximehuran.fr/en/use-a-varien-data-collection-with-filters-sorts-orders-and-limits/
Filtering error when using custom Varien object collection in admin grid

The first one is incomplete whereas the answer in the second one is too broad to help.

I know I have to use a custom collection class that extends Varien_Data_Collection I simply wanna know exactly the methods (and the details of them) I need to implement inside to be able to handle paging, sorting and filtering ?


texts: Mysql joins 'e' v 'main_table' - flat v eav

texts:
When you guys are doing mysql joins on product and category collections how do you plan/deal with the differences in eav and flat collection?

The main thing i see is that eav using 'e' for the column name whereas flat uses main_table.

Am i correct in stating that to have a single join work in both situations I must check first if flat is enabled in order to provide the correct collumn name?

Or am i not understanding something correctly?


texts:
I have a task of trying to use store manager to upload images as part of a large import for a new store we are creating,

However the import I run does not upload the images correctly,

I have been following -https://www.mag-manager.com/useful-articles/magento-product-management/import-images-with-store-manager-for-magento/

but the images do not appear as they should, the result of magento back end is -


texts: Add a static image on PHTML page and CMS Blocks : Magento2

texts:
How I can Add a static image on PHTML page and CMS Blocks into Magento2?
in Magento 1.x it was possible using $this->getSkinUrl('images/xyz.jpg')
I am trying following method into Magento2
In Phtml File:
<img src=”<?= $block->getViewFileUrl(‘images/footer-logo.png’); ?>” alt=”Demo” />

In CMS Blocks:

but it's not working properly. Please suggest me my mistakes


texts: Trying to override a community pool template

texts:
So, I am trying to override a template from an extension we have installed. This is the template location:

app/design/frontend/enterprise/default/template/affiliatepluscoupon/affiliatepluscoupon.phtml

This is how I have gone about overriding it:

config.xml:

<frontend>
  <updates>
    <blizzardlabs_affiliateplusext>
      <file>blizzardlabs_affiliateplusext.xml</file>
    </blizzardlabs_affiliateplusext>
  </updates>
</frontend>

Layout:

app/design/frontend/enterprise/default/layout/blizzardlabs_affiliateplusext.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <affiliatepluscoupon_index_index>
        <reference name="affiliatepluscoupon">
            <action method="setTemplate">
                <template>affiliateplusext/affiliatepluscoupon.phtml</template>
            </action>
        </reference>
    </affiliatepluscoupon_index_index>
</layout>

Here is the original layout for reference:

app/design/frontend/enterprise/default/layout/affiliatepluscoupon.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
    <affiliateplus_default>
        <reference name="account_navigator">
            <action method="addLink" translate="label" module="affiliatepluscoupon">
                <name>banners</name><path>affiliatepluscoupon/index/index</path><label><![CDATA[Coupon]]></label><disabled helper="affiliatepluscoupon/couponIsDisable" /><order>40</order>
            </action>
        </reference>
    </affiliateplus_default>
    <affiliatepluscoupon_index_index>
        <update handle="affiliateplus_default" />
        <reference name="head">
            <action method="addCss"><styleSheet>css/magestore/affiliatepluscoupon.css</styleSheet></action>
        </reference>
        <reference name="content">
            <block type="affiliatepluscoupon/affiliatepluscoupon" name="affiliatepluscoupon" template="affiliatepluscoupon/affiliatepluscoupon.phtml" />
        </reference>
    </affiliatepluscoupon_index_index>
</layout>

I feel like I have done what I should but its not picking it up. I manually flushed cache (its off anyway) / ctrl f5 and still nothing. With all these long names im probably looking at a spelling error somewhere but i can't find it. Any help?!


texts: Simple way to add static content to footer

texts: In which file can I just add HTML to add content to the footer, only using the luma theme


texts: Cookie can NOT be set anymore and site unavailable

texts:
I can't access the frontend of my site
http://magento.p292682.webspaceconfig.de/
anymore.
However, I was able to access the site from a machine that had a cookie saved from that site (10 hours earlier). Deleting cookies from that machine made the site unavailable again so I'm 100% sure that it is a cookie problem.
I don't know what happened but cookies are not set anymore (I think that this is the problem) and therefore the site is not available anymore.


texts:
I want to create customer group admin to view orders only.

Basically, I have created 3 customer group - A, B, C

Now I want that there should be user (basically new admin roles) like Ma can see all orders done by a customer of group A

likewise, Mb can view all order done by a customer of Group B.

How can I do it ...

Any way to do it via observer, which observer should I write please guide me.


texts: How to add dynamic row in custom module magento 2

texts:
I have created the adding dynamic row entity in config module,
here is the snap shot for same,

Now i want the same functionality while i am adding or editing the form through admin grid .
Please check the snapshot of form,

If anyone know the solution please let me know,this will be huge help
Thanks in advanced


texts:
I'm trying to use one grid for multiple ResourceModels, so far I've got one grid working fine.

I can load the grid up fine using http:{}/admin/grid/grid/

However when i create a new route to load the same controller:
http:{}/admin/grid2/grid/ . I get no main block content

Here's my component UI based grid setup: Works fine for route /admin/grid/grid.

Does anyone know if i need to duplicate some files/directories to get grid2 to show?


texts: Filter product with less than two categories

texts:
My SOAP api script should list products that are in one or none categories.
I don't know how filter works with category_ids:

$filters = array(
    'category_ids' => array('like'=>'???')
);

$products = $proxy->call($sessionId, 'product.list', array($filters));


texts: Filtering a product collection and removing an item on the category page results in an inaccurate collection size

texts:
After filtering a product collection and removing an item the size of the collection returned is incorrect, although the product output/count is as expected. This causes an issue on the category list page as it will display "showing items 3-5 of 6" when there are only 5.

Using the event catalog_block_product_list_collection i'm getting the product collection like so $productCollection = $observer->getEvent()->getCollection();

I then clear it and apply a filter to it:

  $productCollection->addAttributeToFilter(array(
            array('attribute' => 'example_attr_1', 'finset' => $websiteFilter),
            array('attribute' => 'example_attr_2', 'finset' => $websiteFilter)
        ));

I'm filtering for products with a matching value in either attribute, but I then have to loop over the collection to check if example_attr_2 has a value, if so it takes priority over example_attr_1 and if the $websiteFilter value isn't in the array of values which i get from example_attr_2 then the product is removed from the collection using $productCollection->removeItemByKey($_product->getId());

After this i set the collection $observer->getEvent()->setCollection($productCollection);

I don't think it's possible to do what I need using the collection filters? so I had to loop over the collection and remove the item but this causes the problem with the collection size. I found this answer related to the collection getSize() method.

https://stackoverflow.com/a/20578447/1156764

I guess at this point the collection has already been loaded so the totalRecords has been set, any ideas?

Thanks


texts: Notice: Undefined property: Test\Module\Block\StockLeft::$_registry in C:\xampp\htdocs\Magento2\app\code\Test\Module\Block\StockLeft.php on line 28

texts:
I am creating a module that show the product stock item dynamically, but it is giving error

  "Parse error: syntax error, unexpected ':', expecting ')' in C:\xampp\htdocs\magento2.3.3\app\code\Test\Module\Block\StockLeft.php on line 31"

StockLeft.php

<?php

namespace Test\Module\Block;

use Magento\Framework\Registry;
use Magento\Framework\View\Element\Template;

class StockLeft extends Template
{
    private $registry;

    public function __construct(
        Template\Context $context,
        Registry $registry,
        array $data = [])
    {
        parent::__construct($context, $data);
        $this->registry = $registry;
    }

    public function getRemainingQty(){
        $product = $this->getCurrentProduct();
        return $product->getQty();
    }

    protected function getCurrentProduct(){
        return $this->_registry->registry('product');
    }
}
?>

Template : stockleft.phtml

<?php
    echo $block->getRemainingQty()
?>

Layout : catalog_product_view.xml

<?xml version="1.0"?>
<page layout = "1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <body>
        <referenceContainer name="product.info.stock.sku">
            <block class="Test\Module\Block\StockLeft" name="productleft" template="Test_Module::stock_left.phtml"/>
        </referenceContainer>
    </body>
</page>


texts: Installed magento extension is not showing in admin panel

texts:
I recently started working Ubuntu and installed Magento here. Everything is ok until I tried to install an extension by manually putting files in particular folders, but when I go to admin, the extension is not showing there. Then I went to system->configuration->advance and I saw that module wasn't registered there.

For this I also made all the file permission to read and write, but still the extension is not showing in admin panel.


texts:
Magento 2.1.1, PHP 7.0.

I want to check inside product page or product list if product is in wishlist. Actually I have block which works, but only if Full Page Cache is disabled or this block in xml is marked as cacheable="false"

Is it a bug or is it by design ? Maybe I have a bug in my code?
Block:

namespace [VENDOR]\SkinHelper\Block\Catalog\Product

use \Magento\Catalog\Api\Data\ProductInterface;
use \Magento\Framework\View\Element\Template;
use \Magento\Framework\View\Element\Template\Context;
use \Magento\Wishlist\Helper\Data;

class IsInWishlist extends Template
{

private $customerSession;

private $registry;

private $wishlistHelper;

public function __construct(
    Context $context,
    Data $wishlistHelper,
    array $data
)
{
    parent::__construct($context, $data);

    $this->wishlistHelper = $wishlistHelper;
}

private function getCustomerWishlistItemsCollection()
{
    $itemsCollection = $this->wishlistHelper->getWishlist()->getItemCollection();

    return $itemsCollection;
}

public function isInWishlist(ProductInterface $product)
{
    $productId = $product->getId();

    $itemsCollection = $this->getCustomerWishlistItemsCollection();
    $itemsIds = $itemsCollection->getColumnValues('product_id');

    return in_array($productId, $itemsIds);
}

It's added in catalog_category_view.xml:

<referenceBlock name="category.products.list"> <block class="[VENDOR]\SkinHelper\Block\Catalog\Product\IsInWishlist" name="name_catalog_isinwishlist" cacheable="false"/> </referenceBlock>

Part of list.phtml, where it can be called:

$IsInWishlist = $block->getChildBlock('name_catalog_isinwishlist');
...

<?php foreach ($_productCollection as $_product): ?> <?php $is_in_wishlist = $IsInWishlist->isInWishlist($_product) ?> <?php echo $is_in_wishlist?>

......

<php? endforeach; ?>

...


texts: Programatically get product collection which are exists in array of categry ids

texts:
I am working on magento product collection query. My requirement to fetch products which are present in array of category.

Example: $all_selected_categories = array('15','35','48','75');

Above categories are from many seperate websites.

My query is:

$collection_check = Mage::getModel('catalog/product')
                    ->getCollection()
                    ->addAttributeToSelect(array('entity_id','name','description','created_at','price','status','parent_id'))
                    ->addAttributeToFilter('status', 1);
$collection_check->joinField('category_id','catalog/category_product', 'category_id', 'product_id = entity_id',null, 'left');
$collection_check->addAttributeToFilter('category_id', array('in' =>array('finset' => $all_selected_categories)));

But i am getting error of already exists of id.


texts:
How many ways to do dependency injection?
Object Manager,Constructor injection and Method injection
Is that it ?


texts: How to add label on all lines of street fields in backend customer address field and turn then required?

texts: how to add label in the backend admin grid  that is sales->order-> Create new order from the backend and add the street label and also remove the required field for the postal code


texts: Magento : How to call block in short description on product page?

texts:
I need to add different sliders on each product detail page.
I am using slider plugin to achieve this. But the block code

{{block type="bannerslider/default" name="bannerslider.bannerslider" template="bannerslider/bannerslider.phtml" bannerslider_id="your_bannerslider_id"}}

is not working for product detail page.

It shows the same code as output if I use it in short description field of product detail page and works fine for normal CMS page.

Please suggest...


texts: Magento 1: why some observer method call getEvent() and some don't?

texts:
Something I noticed recently and I'm curious about it.

Example 1: the use of getEvent()

In Mage_Core_Model_Locale in the setLocale() method, an event is dispatched:

Mage::dispatchEvent('core_locale_set_locale', array('locale'=>$this));

An observer for this event is bindLocale() from Mage_Adminhtml_Model_Observer

public function bindLocale($observer)
{
    if ($locale=$observer->getEvent()->getLocale()) {
        if ($choosedLocale = Mage::getSingleton('adminhtml/session')->getLocale()) {
            $locale->setLocaleCode($choosedLocale);
        }
    }
    return $this;
}

So as you can see, to retrieve the locale, we first call getEvent() on the observer.

Example 2: without getEvent()

In Mage_Wishlist_Block_Customer_Wishlist_Item_Options in the __construct() method, an event is dispatched:

Mage::dispatchEvent('product_option_renderer_init', array('block' => $this));

So we agree that the same syntax is used for example 1 and 2.

However, an observer for this second example is initOptionRenderer() from Mage_Bundle_Model_Observer

public function initOptionRenderer(Varien_Event_Observer $observer)
{
    $block = $observer->getBlock();
    $block->addOptionsRenderCfg('bundle', 'bundle/catalog_product_configuration');
    return $this;
}

And as you can see, to retrieve the block, we don't call getEvent() on the observer

Question

Why is the getEvent() method called in example #1 ? Or why is getEvent() not called in example #2 ?
What's the purpose of the getEvent() method ?
Where should one use getEvent() and where shouldn't one use it ?


texts: override default image file for product via module

texts:
i want to use my custom media.phtml for products , how can i do it instead of changing media.phtml , i am new here can u please tell how can i do it via module.

i want that my module should use custom media.phtml that i created so that my chnages do not get lost on theme update


texts: How to create order with payment method "paypal_express" in Magento through Custom Api

texts:
I have a situation where I did complete the payment process using paypal express mobile sdk, in return I get transaction id, that according to my understanding have to save with the previously created order.

That is exactly what I did, when completed the payment process using paypal standard. I am explaining what i did in paypal standard.

1) Place order and created incrementid.

2) Initiate paypal standard sdk and provide item information to it along with credentials.

3) Successfully complete the payment process, in paypal standard mobile sdk.

4) In return I get transaction id.

5) Save this transaction-id in the previously created order, by editing the order.

Now if talking about paypal express, In Paypal Express payment process got complete before order is been created. So let me explain what I did here.

1) After Customer choose payment method as Paypal Express, and proceed to next step, I use paypal Express sdk for the payment process.

2) Completed the payment process.

3) Saved Payment method in customer quote.

4) and at last created order with following code.

$quote->collectTotals();
$service = Mage::getModel("sales/service_quote", $quote);
$service->submitAll();
if($isNewCustomer)
    $customerResource->involveNewCustomer($quote);
$order = $service->getOrder();
if($order) {
    Mage::dispatchEvent("checkout_type_onepage_save_order_after", array("order" => $order, "quote" => $quote));
    try {
        $order->sendNewOrderEmail();
    }
    catch(Exception $e) {
        Mage::logException($e);
    }
}
Mage::dispatchEvent("checkout_submit_all_after", array("order" => $order, "quote" => $quote));

But this results in following error.

exception 'Mage_Core_Exception' with message 'PayPal NVP gateway errors: Invalid token (#10410: Invalid token). Correlation ID: 61dee43edff3a. Version: 72.0.' in /usr/share/nginx/www/app/code/core/Mage/Paypal/Model/Api/Nvp.php:1062

Any help is much appreciated :)

Thanks


texts: Update product sku with customs options skus on product pages and cart

texts:
How can I dynamically update the sku of a product on the product page when users select its custom options?  Also, how could it then be passed into the cart page?

Example:  A product with sku XXX has two custom options Y and Z, which have the options of Y1, Y2 and Z1, Z2.  If a user selects Y1 and Z2, I'd like to change the sku on the page to XXX-Y1-Z2 and pass that sku to the cart.

Thanks.


texts: Magento 2: How to validate cart price rule in product view?

texts:
I'm trying to show the price rules in the product view, but I can not find a way to validate if a product meets the rule...

At the moment I just get all the rules.

Block:

class RuleDescription extends \Magento\Framework\View\Element\Template
{

    protected $_registry;
    protected $_collection;
    protected $_rule;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\SalesRule\Model\ResourceModel\Rule\CollectionFactory $collection,
        \Magento\SalesRule\Model\Rule $rule
    )
    {
        $this->_registry = $registry;
        $this->_collection = $collection;
        $this->_rule = $rule;
        parent::__construct($context);
    }

    public function getCurrentProduct()
    {
        return $this->_registry->registry('current_product');
    }

    private function getAllCartRules()
    {
        return $this->_collection->create();
    }

    public function getActiveCartRules()
    {
        $product = $this->getCurrentProduct();

        /**
         * get cart price rule
         */

        $rules = $this->getAllCartRules()->toArray();
    }
}

I know it's not easy because of the amount of conditions, but is there any way?


texts: How can reset admin password using rest api. I want to reset admin password using rest api in  Magento 2


texts:
I have a popup for login in custom page
when user login from custom page i want to trigger an event "log in"
& in that event i am trying to pass the "location" property.
I am not sure how can i append this location to the event
so that in my observer i can fetch it as
$observer->getEvent()->getData('location');

Any thoughts on this ?
Thankyou


texts: Order status changes to processing again after paypal capture funds

texts:
The problem I am having is that first order is processed and then when the funds are captured from PayPal,the order status is again changed to processing.But the order is already processed.

Any suggestions?


texts: Magento 2: How to add Class on Checkout Page?

texts:
I would like to add below class on "Firstname"

class="validate-length minimum-length-10 maximum-length-100"

It should be applied on Checkout Page.

domain.com/checkout/

Need to override file magento\vendor\magento\module-checkout\view\frontend\templates\onepage.phtml?


texts:
I'm developing a module for Magento2 and I'm using requirejs to load custom javascript that depend on jquery. I'm using the shim option in requirejs-config.js to set this dependency between the custom scripts and jquery. The issue is that this dependency is not (always) set. Sometimes jQuery does load before the script and all is fine but sometimes it loads after the scripts resulting in a script error:

Uncaught ReferenceError: jQuery is not defined(anonymous function) @ jquery.easing.1.3.js:39
Uncaught ReferenceError: jQuery is not defined(anonymous function) @ jquery.flexslider-min.js:5
Uncaught TypeError: $(...).flexslider is not a function

See below an example of my requirejs-config.js:

var config = {
    map: {
        '*': {
            'flexslider': 'Vendor_Modulejs/jquery.flexslider-min',
            'picturefill': 'Vendor_Modulejs/picturefill.min',
            'easing': 'Vendor_Modulejs/jquery.easing.1.3',
            'hoverintent': 'Vendor_Modulejs/jquery.hoverIntent',
            'fitvids': 'Vendor_Modulejs/jquery.fitvids',
            'vimeo': 'Vendor_Modulejs/jquery.vimeo.api.min'
        }
    },
    shim: {
        'flexslider': ['jquery'],
        'picturefill': ['jquery'],
        'easing': ['jquery'],
        'hoverintent': ['jquery'],
        'fitvids': ['jquery'],
        'vimeo': ['jquery']
    }
};

This is the javascript in my phtml file:

require(['jquery', 'domReady!', 'picturefill', 'flexslider', 'easing', 'hoverintent', 'fitvids', 'vimeo'], function($) {
    "use strict";

    // javascript here

});

What am I doing wrong here, why isnt the shim option honored and is jQuery not always loaded before the other scripts.


texts: where should be compilation in magneto2 kubernetes stack

texts:
I have conceptual question

Where should be the static-content:deploy and di:compile for magento2 production environment on a kubernetes pod

it should be in app image that push/build into your registry ?

so the pods will start the container with already build assets and proxy files

or it should somehow start build on pod-initialize  or after pod-initialize ?

please help me for best practice on magento2 kubernetes setup.


texts:
I was reading Magento 1.6 RDBMS guide and it said that adapters for Oracle and MS SQL will be introduced later. Now in 1.9 under release notes, I can't find that they have added this feature. Can you please tell me if the adapters have been introduced or point me to the right documents?
Thank you


texts:
I am getting Current category Parent category and all Subcategory it working fine

<?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
    $base_url = $storeManager->getStore()->getBaseUrl();
    $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
    $category_name =  $category->getName();
     if($this->getLayer()->getCurrentCategory()):
    $subcategories=$this->getLayer()->getCurrentCategory()->getCategories($this->getLayer()->getCurrentCategory()->getId());?>
            <a class="active" href="<?php echo $category->getParentCategory()->getUrl();?>"><?php echo $category->getParentCategory()->getName();?>
        <?php echo $category_name;?>

       <?php
        $i = 0;
        foreach($subcategories as $subcategory){?>

                  <a href="<?php echo $base_url.$subcategory->getrequest_path();?>" title="<?php echo $subcategory->getName();?>">
                  <?php echo $subcategory->getName();?>

        <?php   $i++;
                if($i==8){
                    break;
                  }
        }?>

    <?php //}
    endif;
?>

But i want all level of parent How to get it


texts: How to add a profile picture in Magento 2?

texts: I want the user to have the option of uploading his picture online. I want to add a new tab in 'My account' menu with a button to add, delete his profile picture.


texts: Magento Connect Manager Connect Error: Fail to open a file

texts:
I'm using Magento Community on my Win8.1 with Apache2.

I've been using Magento Connect Manager install a lot of plugins.

I'm trying to install M2E Pro today and I got a problem, which is the error below:

"
Checking dependencies of packages
Starting to download m2epro_ebay_magento-6.2.1.tgz ...
...done: 2,347,484 bytes
Installing package community/m2epro_ebay_magento 6.2.1

CONNECT ERROR: Failed to open file C:/Program Files (x86)/Zend/Apache2/htdocs/magento\downloader.cache\community\m2epro_ebay_magento-6.2.1\app/code/community/Ess/M2ePro/Block/Adminhtml/Wizard/InstallationEbay/Installation/ModeConfirmation/"

I think the reason is that some settings on my machine cutted off the path of the file...I had a similar problem before, same case: path was too long.

Update:

I don't think its permission problem since I installed other plugin successfully before.


texts: Failed to close the popup modal form in magento 2

texts:
I have created  Popup modal form, the form is successfully submitted and showing response, but after showing response I need to close the popup modal but failed to close the popuup modal

js file

 define([
    "jquery",
    "jquery/ui",
    "Magento_Ui/js/modal/modal"

],
        function ($) {
            "use strict";
            // Review form
            var xxx = {
                type: 'popup',
                responsive: true,
                innerScroll: true,
                buttons: false,
                title: "aaa",
                modalClass: "popup-center",
                clickableOverlay: true,

            };
           var abc = $('#form-div-id').modal(xxx);
            $(".link").click(function () {
                abc.modal("openModal");
            });

            return function (config) {
                $('#review-form').on("click", "#review-submit", function () {
                    var form_data = $("#review-form").serialize();
                    var reviewurl = config.url;
                    $.ajax({
                        url: reviewurl,
                        type: 'POST',
                        // Pass the submitted form data to Controller
                        data: form_data,
                        success: function (response) {

                            var returnedData = JSON.parse(response);
                            if (returnedData.status === 'success')
                                $("#success").html(returnedData.messages);
                            else
                                $("#error").html(returnedData.messages);

                        },
                        error: function (response) {
                            var returnedData = JSON.parse(response);
                            $("#error").html(returnedData.messages);
                        }

                    });
                    var close = this;
                    setTimeout(function () {
                        close.closeModal();
                    }, 3000);
                   return false;

                });
            };

        });


texts: Magento 2 equivelent of __("whatever %s", $variable)

texts:
In Magento 1 you can use something like this

Mage::helper('module')->__('Hi %s, there is an error', $name);

https://stackoverflow.com/a/21726921/10121426

Does Magento 2 support this?  If so what is the syntax?

Tried __('Hi %s, there is an error', $name) but doesn't work


texts: Magento 2 Product page title different from meta title

texts:
I don't know if I'm being daft here or what but my product page is showing product name as the title in browser tab and it is ignoring the meta title set in the Search Engine Optimization Meta Title field. If I look through the source code it is pulling it through correctly.

So my source code is as below:

<meta name="title" content="Blank White 480-Micron Self-Adhesive Plastic Cards | Low Prices 24/7"/>
<title>Blank White Self-Adhesive 480-Micron Plastic Cards (100 Pack)</title>

It works perfectly on category page though so both page title and meta title are the same.

I'm on Magento 2.3.0.


texts: SQL server database migration to Magento 2

texts: I want to migrate products, categories, customers , product reviews and product related products, videos etc from sql server database engine to Magento 2. Can anyone help me how to migrate those data?


texts: I want to create column in sales_order table and view custom field on order edit section in magento 2.3.5

texts:
I am added one custom field in checkout address form and i want to store that field data in Database and also display this field in admin order edit page in magento 2.3.5, so anyone can have idea please help me.

Thank you in advance.


texts: How to change price when customer group get change from my account

texts:
I need to know how we can achieve this when the user changes its group to another customer group that has a different price.
This is working when the user logout and gets login again but I want to change the price or get the product price as per group by making the user not to logout and login again.
For example, there is 2 customer group 1. wholesale and 2. general.
Product A is 10$ for General and 8$ for Wholesale.
The first User is assigned to General and then the user is free to changes its group from MyAccount.
After the user changes its group from general to wholesale then the price of Product A should get change from 10$ to 8$.
Thanks


texts: Magento2.2.5 remove default product title and add custom phtml file on product detail page

texts:
in Magento2.2.5 I want to remove the product name and instead where it is load a custom phtml file that will call in a custom product attribute

However my phtml file is not being called in here is my catalog_product_view.xml which I have in my custom design:-

  app/design/frontend/vendor/theme/magento_Category/layout

folder

<?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="page.main.title" destination="product.info.main" before="-"/>
    <move element="prev_next_products" destination="product.info.main" before="-"/>
    <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
    <move element="product.special.price" destination="product.info.main" after="product.info.price"/>

    <move element="product_view_try_on" destination="product.info.media" before="-"/>
    <referenceBlock name="product.attributes" remove="true" />
    <block class="Magento\Catalog\Block\Product\View" name="product_custom_name" template="Magento_Catalog::product/view/product_custom_name.phtml" before="product.info.price"/>

</body>


texts: Turn on CRON jobs, many months after published webshop. What happens?

texts:
I have taken over the responsibility for a web shop. This Magento shop has not activated the CRON jobs. Meaning all purchases has not been sent out the emails and all that related CRON jobs stuff at all since the beginning.

I was just about to activate cron jobs, but does this mean a lot of people are going to get tons of emails now, months after their purchase?

Can I clear everything before activating the cron job?


texts: Magento 2 - grouped categories product type?

texts:
Are there any extensions that create a product type that is similar to the grouped product type, but instead of a list of products being configurable, a list of categories is configurable instead. I have searched but have not found anything.
I want to display on a product page all of the products from multiple categories, with each category having a dropdown with a list of these products.


texts:
I want to give customers the option to collect a shipment, so the order needs no amount for shipment.
How to do that?
Thanks.


texts: Optimise the process of saving products programatically

texts:
I am updating everyday the prices/stock data from our stock management system across 9 stores so obviously the process takes a lot of time for thousands of products.

How can I improve the performance?

One improvement that I did was to run the reindex after the import has finished and not on product save. Is there anything else that I can do?

For those experienced, can you share how long does it take for you to update 5000 products programatically (also magento version)?


texts: How to correctly setup robots.txt to block out bad bots but allow Google, Yahoo, Bing and other good bots to access and index the site?

texts:
We were having some problems with performance a few months ago and my hosting company told me this:

"You have also many hits from all kinds of bots, and when they have too many requests at the website at once it also causes the load to spike."

and

"You should check your website and protect it a bit more in regards to unknown bots."

and

"Regarding the block of search engine crawlers, you can check out the robots.txt file
It is a simple .txt file which is placed in the sites root directory.
To disable all search engine crawlers except google this would be the content (minus the quotation marks)

"User-agent: *
Disallow: /

User-agent: Googlebot
Allow: /"

So I decided to block all bots except for Google - my robots.txt file is located in my Magento root directory and it now looks like this:

User-agent: *
Disallow:

Sitemap: http://www.myw-e-bSITE.com/sitemap/sitemap.xml

User-agent: *
Disallow: /

User-agent: Googlebot
Allow: /

But now I'm thinking maybe this was not such a smart move? (we are not getting as many visitors as before) I mean - should I add Bing and Yahoo also? Any other important Search engines you can think of? And what is the exact code to add Yahoo and Bing?


texts: Magento Upload Images missing (Firefox only)

texts:
I came across an issue, basically when I am trying to upload a product image in the magento admin panel. I dont see the upload button. After some searching, I realized its a flash issue, Firefox stopping supporting flash.
Currently only Chome and IE support it.
Similar post: Magento 1.9 - No upload image buttons

Next month, new version of chrome will stop supporting Flash, how do we go about uploading Product Images? I assume chrome will hide the upload button, just as Firefox does.


texts:
I have added a function where in when the user select multiple order then trigger the Download PDF button I added it will download PDF's with X number of PDF based from the number of selected orders. So basically when I select 3 PDF it should generate or download 3 PDF. But on my function it only download one pdf. How can I tell Magento 2 to download 3 pdf or more based from the number of selected items.

Below is my sample code

public function printPDF()
{
    $pdf = new \Zend_Pdf();
    $pdf->pages[] = $pdf->newPage(\Zend_Pdf_Page::SIZE_A4);
    $page = $pdf->pages[0]; // this will get reference to the first page.
    $style = new \Zend_Pdf_Style();
    $style->setLineColor(new \Zend_Pdf_Color_Rgb(0,0,0));
    $font = \Zend_Pdf_Font::fontWithName(\Zend_Pdf_Font::FONT_TIMES);
    $style->setFont($font,13);
    $page->setStyle($style);
    $width = $page->getWidth();
    $hight = $page->getHeight();
    $x = 30;
    $pageTopalign = 850;
    $this->y = 850 - 100;

    $style->setFont($font,14);
    $page->setStyle($style);
    $page->drawRectangle(30, $this->y + 10, $page->getWidth()-30, $this->y +70, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);

    $style->setFont($font,13);
    $page->setStyle($style);
    $page->drawText(__("Cutomer Details"), $x + 5, $this->y+50, 'UTF-8');
    $style->setFont($font,11);
    $page->setStyle($style);
    $page->drawText(__("Name : %1", "Test Meetanshi"), $x + 5, $this->y+33, 'UTF-8');
    $page->drawText(__("Email : %1","test@meetanshi.com"), $x + 5, $this->y+16, 'UTF-8');

    $style->setFont($font,11);
    $page->setStyle($style);

    $page->drawText(__("PRODUCT NAME"), $x + 60, $this->y-10, 'UTF-8');
    $page->drawText(__("PRODUCT PRICE"), $x + 200, $this->y-10, 'UTF-8');
    $page->drawText(__("QTY"), $x + 310, $this->y-10, 'UTF-8');
    $page->drawText(__("SUB TOTAL"), $x + 440, $this->y-10, 'UTF-8');

    $style->setFont($font,10);
    $page->setStyle($style);
    $add = 9;

    $page->drawText("$12.00", $x + 210, $this->y-30, 'UTF-8');
    $page->drawText(10, $x + 330, $this->y-30, 'UTF-8');
    $page->drawText("$120.00", $x + 470, $this->y-30, 'UTF-8');
    $pro = "TEST product";
    $page->drawText($pro, $x + 65, $this->y-30, 'UTF-8');

    $page->drawRectangle(30, $this->y -62, $page->getWidth()-30, $this->y + 10, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);
    $page->drawRectangle(30, $this->y -62, $page->getWidth()-30, $this->y - 100, \Zend_Pdf_Page::SHAPE_DRAW_STROKE);

    $style->setFont($font,15);
    $page->setStyle($style);
    $page->drawText(__("Total : %1", "$50.00"), $x + 435, $this->y-85, 'UTF-8');

    $style->setFont($font,10);
    $page->setStyle($style);
    $page->drawText(__("Test Footer example"), ($page->getWidth()/2)-50, $this->y-200);

    $fileName = 'meetanshi.pdf';

    $this->fileFactory->create(
       $fileName,
       $pdf->render(),
       \Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR, // this pdf will be saved in var directory with the name meetanshi.pdf
       'application/pdf'
    );
}

So in my execute() function I added this call

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

But it only download 1 PDF. How can I tell it to download multiple times?


texts:
I am using Custom Product preview extension from AITOC.

After installing the extension, I have checked the product to edit.

After editing the product, I am clicking on Apply changes button to apply custom design, but button is not working

When I click on a Button, action hits but change after 1 second with domain name, which is showing 403 forbidden error.

I have contacted to the support team & they replied that it is the server configuration issue.

So, is this issue related to the server configuration or anything else?


texts: Where in the code is recently viewed products added to the database table?

texts:
I have a site that has recently viewed products not working for whatever reason.  It could very much be because someone stripped out some part of the code somewhere that handles this functionality.

I was able to find the database table report_viewed_product_index which is defined as:

    <models>
        <reports>
            <class>Mage_Reports_Model</class>
            <resourceModel>reports_resource</resourceModel>
        </reports>
        <reports_resource>
            <class>Mage_Reports_Model_Resource</class>
            <deprecatedNode>reports_mysql4</deprecatedNode>
            <entities>
                <event>

report_event

                </event>
                <event_type>

report_event_types

                </event_type>
                <compared_product_index>

report_compared_product_index

                </compared_product_index>
                <viewed_product_index>

report_viewed_product_index

                </viewed_product_index>
                <viewed_aggregated_daily>

report_viewed_product_aggregated_daily

                </viewed_aggregated_daily>
                <viewed_aggregated_monthly>

report_viewed_product_aggregated_monthly

                </viewed_aggregated_monthly>
                <viewed_aggregated_yearly>

report_viewed_product_aggregated_yearly

                </viewed_aggregated_yearly>
            </entities>
        </reports_resource>
    </models>

So I searched the code base for reports/viewed_product_index to see if I can find a ->save() going on somewhere but that didn't seem to lead me any where.

Any thoughts on how to go about finding where this happens?


texts: Export Products, 1.9.2.4 not valid data - Media.phtml

texts:
I am trying to export products using Magento, i choose export, products and returns with empty attributes list, and i click continue it says Not Valid Data....
i have checked log and it says:

2016-09-28T10:12:00+00:00 ERR (3): Notice: Undefined variable: thumb_type  in //app/design/frontend/smartwave/porto/template/catalog/product/view/media.phtml on line 44

i have checked that line and it says:

<ul id="etalage_<?php echo $rnd_str; ?>" class="<?php echo $thumb_type; ?>">

any help anyone ?
regards


texts: How to add new field in Add new Customers in Admin Magento 2.2.5?

texts:
I want to add new field in Add new customers in Magento admin.
Customers-> All customers-> Add new customers,

Refer my screenshot.

Any help would be appreciated.


texts:
I am getting an issue like Invalid customer address id at

  Magento\Framework\Exception\NoSuchEntityException(code: 0): Invalid
  customer address id 57 at
  vendor/magento/module-quote/Model/QuoteAddressValidator.php:79

Please let me know the exact reason for this issue.Sometimes my credentials work fine, sometimes getting issue while checkout.


texts: I want to show available stocks on my magento 2.4 store front and user can choose any stock that he wants, for example I have a stock on Miami and a stock on Florida for SKU 325, now customer wants to buy product 325. how can he choose Miami stock?


texts:
I have a problem for add a simple JavaScript on my admin dashboard.

I have create a local.xml with my folder theme but no result.

www\app\design\adminhtml\mytheme\default\layout\local.xml

<layout>
    <default>
        <reference name="head">
            <action method="addJs"><script>mytheme/jquery.js</script></action>
        </reference>
    </default>
</layout>

Thanks for your help.


texts: Magento1.9 - How we embedded the code of Bannersnack?

texts:
I have some script , that I have received from embedded Bannersnack.com.
Now I need to integrate that code into Magento1.9.
For that how I can implement?
Anyone can help me?


texts: Magento 2: How to display store information in email footer?

texts:
Using magento 2.2.2 with custom theme which inherits from Magento/blank.

I am altering the template stored here:

  [Vendor]/[Theme]/Magento_Email/email/footer.html

I would like to include my store information (telephone number, address etc.) inside the footer programmatically, but I am unsure whether/how I can format a reference to the store information inside the footer.html file.

I would also like to include social links, though I'm not sure whether it's best to do this programmatically, using a social plugin, or to hard code the links directly into the email template.


texts: before submit a form atleast one checkboxes is required

texts:
I have shown multiple check boxes,when I submit need atleast one checkbox is required., i tried below code.,

$fieldset->addField('checkboxes', 'checkboxes', array(
            'label'     => Mage::helper('listings')->__('Select Categories'),
            'name'      => 'cat_ids[]',
            'values'    => $categorieslist,
            'onclick'   => "",
            'onchange'  => "",
            'value'  => $cat_ids,
            'disabled' => true,
            'class' => 'category_match_to_listing',
            'required' => true,
        ));

even class name also not displayed in html

<input type="checkbox" value="14" name="cat_ids[]" id="checkboxes_id">

if i get one value 'values'    => 'single', required field working fine,then the html is

<input type="checkbox" value="0" class="category_match_to_listing required-entry" name="cat_ids[]" id="checkboxes_id">

when I get dynamic it doesn't work., please suggest any ideas?


texts: Overwrite Category Display Mode from "Static Content Only" to "Products Only" via Layout XML

texts:
I want to overwrite the "Display Mode" backend setting of a certain category via layout xml file (e.g. catalog_category_view_id_XYZ.xml).

Any idea how to update the layout handle?

I want to do this via layout xml file, so I can populate the category during a certain period of time (christmas offers should only be seen during december) with a scheduled child theme and the rest of the year there should only be the static block.

Cheers,
Juha


texts:
When I try to update magento 2.1.9 to 2.2.0 I am getting this error

  Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Serialize\SerializerInterface in vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php

I try to edit app/etc/dl.xml but I am not getting what to update in preference type


texts: Magento2 Plugin for beforeExceute that return a $resultRedirect->setPath('customer/account/login');

texts:
I've to "override" a module that manage a redirect.
The original module have this code:

public function execute()
    {
            [...]
            $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
            return $resultRedirect->setPath('customer/account/login');
            [...]
    }

How can i modifiy that result?
I'm trying to create a plugin with an after method, but i'm not sure that i can works.

<?php

namespace ACME\MODULE\Plugin\Original;

class Login{

    public function afterExecute(\Bla\Bla\Controller\Original\Login $subject, $result){
// What i've to put down here?

    }

}


texts: Add Product Id Array To Custom Table From Admin

texts:
I think I've kicked the hornets nest. I have a custom db table. I am displaying a list of products in admin similar to the related products tab or the upsell tab.

I want the id's of selected products (those the user has ticked) to go into my database field in the form of a single-dimensional array (1,2,3,4).

Is this insane, possible, sort-of-crazy?

I have the module and the product table but I can't get the data into the database. Any pointers would be helpful, thank you!


texts: Removing unused Zend libraries from Magento

texts:
I'm overriding a Magento 1.9 clean directory with a 5 years customized store.
That store was patched and updated many times since Magento 1.3.

Database was manually fixed and all store works as expected after upgrade.

But I saw many abandoned Zend files in diff process.

lib/Zend/InfoCard.php
lib/Zend/Cloud/StorageService/Adapter/Nirvanix.php
lib/Zend/Http/UserAgent/Features/Adapter/WurflApi.php
lib/Zend/Locale/Data/(many xml files - ldml nodes)
lib/Zend/Markup/Parser/Textile.php

I don't know if this is a required Zend library anymore.

Can I remove that files?


texts: Magento 2 - How to display recently viewed products in customer account sidebar?

texts:
Can anyone tell me how can I show a recently viewed product section in the customer account sidebar?

Any help would be appreciated.

Thanks in advance..!


texts: htaccess redirect https to http except specific pages

texts:
I want to redirect https to http for almost all pages, except for checkout, cart and account. Especially to improve speed.

How do I define that inside my htaccess?

All my rewrite rules in htaccess:

RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/customer/account/
RewriteCond %{REQUEST_URI} !^/checkout/
RewriteCond %{REQUEST_URI} !^/wishlist/
RewriteCond %{REQUEST_URI} !^/ebizautoresponder/
RewriteCond %{REQUEST_URI} !^/admin/dashboard/index/key/
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

##### Block unwanted Crawler Bots that clog your server #####

RewriteCond %{HTTP_USER_AGENT} MJ12bot
RewriteRule .* - [F]
RewriteCond %{HTTP_USER_AGENT} 80legs [NC]
RewriteRule ^ - [F]

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

I use these settings for secure and unsecure:


texts:
I'm experience a strange problem with my magento installation.

So, I can login (front and back office) in ie, firefox and in the front office with chrome but for some strange reason, I cannot login to the back office with chrome.

I managed to narrow down the problem (I think). It is related with the cookies.

This is how my cookies are before I try to login:

And this is after, as you can see the first one "adminhtml" stays untouched.

This is the problem. I don't know why is this cookie not been set to the proper value like the others. If I clear all the cookies I manage to login, but then when I logout and try to login again ,the same problem comes back.

Any thoughts? Thanks for the help.

UPDATE: From the provided link I'm trying to figure out what is happening.

  Possible causes include

  Local computer time vs. server time mismatch, causing instant cookie invalidation. Make sure your server time is correct.

Can anyone tell what exactly should I do here. My server time is Mon Oct 12 06:03:11 CDT 2015 and on the magento back-end I get 10/12/2015 12:02:25 pm (MM/DD/YYYY). So clearly there is a big difference between them (due to timezone differences), but I cannot change the server time (shared server). The only solution is to change the locale setting from the magento installation, right? But with this my costumers will get wrong timestamp on their invoices, I'm I right?

  Incorrect permissions on var/session, preventing session files from being saved

I've checked this and it's 777.

  Incorrect configuration of database/redis/other session storage, preventing saving of session values

Current configuration is _< session_save><![CDATA[files]]< /session_save>_ (app\etc\local.xml). I had already tried with db, but I got the same result.

  A module is instantiating sessions to early, preventing the correct session names from being set

Anyway of testing this?

  You're a developer using multiple URLs and have multiple cookie domains

Anyway of testing this?

  Another developer has somehow modified app\code\core\Mage\Core\Model\Session\Abstract\Varien.php, creating a hard to track down bug

Restored this file to my original magento version. And I've checked that there is no local modification for this.

  The cookie domain in System -> Configuration -> Web -> Session Cookie Management doesn't match the actual site domain.

Set this to NULL.

  You're using the localhost as your server domain, and using a version of webkit that has trouble/bugs setting cookies for localhost in some situations.

Is not my case...

  Extra: #php n98-magerun.phar sys:check

Everything OK except:
✖ No Bytecode-Cache found! It's recommended to install anyone of apc, eaccelerator, xcache, Zend Optimizer, Zend OPcache.

Not quite sure of what to do with this...

This is my current situation. Thank you all for the help

UPDATE2:

I've changed this file bellow and after this my problem vanish: I did this change through the local folder, but still believe that this isn't the right solution. Don't you?

  File: app/code/core/Mage/Adminhtml/Controller/Action.php

  class Mage_Adminhml_Controller_Action extends Mage_Core_Controller_Varien_Action

  const SESSION_NAMESPACE = 'adminhtml'; changed this to 'adminhtml_1'


texts: Magento 1.9 | Rating not displaying at product list

texts:
Currently, on the list of products starts is displayed only when someone adds reviews. I need to display the stars and message to leave review and rating.
In template found that it should've been displayed "Be the first to review this product",but it's not.
Here is summary_short.phtml
<?php if ($this->getReviewsCount()): ?>

        <?php if ($this->getRatingSummary()):?>

                <div class="rating" style="width:<?php echo $this->getRatingSummary() ?>%">

        <?php endif;?>
        <?php echo $this->__('%d Review(s)', $this->getReviewsCount()) ?>

<?php elseif ($this->getDisplayIfEmpty()): ?>

<?php echo $this->__('Be the first to review this product') ?>

<?php endif; ?>

And corresponding part of rating block in list.phtml

                        <?php
                        if ($this->getChild('name.after')) {
                            $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
                            foreach ($_nameAfterChildren as $_nameAfterChildName) {
                                $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
                                $_nameAfterChild->setProduct($product);
                                echo $_nameAfterChild->toHtml();
                            }
                        }
                        ?>
                        <a href="<?php echo "{$this->escapeUrl($product->getProductUrl())}#customer-reviews"; ?>">
                            <?php if ($product->getRatingSummary()): ?>
                                <?php if ($gc['display_rating'] == 1): //Display on hover ?>

                                        <?php echo $this->getReviewsSummaryHtml($product, 'short'); ?>

                                <?php elseif ($gc['display_rating'] == 2): //Always display ?>
                                    <?php echo $this->getReviewsSummaryHtml($product, 'short'); ?>
                                <?php endif; ?>
                            <?php endif; ?>


texts: How to fix session error in magento 2.3.0

texts: How to fix error "Your session has expired"


texts: Magento 2 : Rest API error the requested URL returned error: 401

texts:
We have to test rest API is working or not in magento 2.3 but on my local project work only live site API not working.
We have to check site open or not using curl but it's not working. I am not able to find issue what.

Curl code

$your_url = "https://domain.com/rest/all/V1/categories?searchCriteria";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $your_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERPWD,"username:password");
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_exec($ch);
if (curl_errno($ch)) {
    $error_msg = curl_error($ch);
}
curl_close($ch);

if (isset($error_msg)) {echo $error_msg;}

Error
The requested URL returned error: 401

How to fix this issue?


texts: Sigil Strings in Magento 2's RequireJS Files

texts:
I've noticed strange-to-me "sigil strings" strewn throughout Magento 2's RequireJS modules.  Here's one example.

return Element.extend({
    defaults: {
        clientConfig: {
            urls: {
                save: '${ $.submit_url }',
                beforeSave: '${ $.validate_url }'
            }
        }
    },

Does anyone know what these strings (${ $.submit_url }, ${ $.validate_url }) are for?  Is it some Magento meta-programming language?   Or are they something executed in Knockout.js context?  Or something else?


texts:
I am working with a custom plugin in Magento 2 that adds two radio fields after all the other inputs. Here is a photo of what it looks like:

When you click on the question mark, a tooltip shows up with some text. I want that text to be displayed right next to "Is Tax Exempt" after the radio buttons instead of being a tooltip, so that the message is always displayed. Here is the current code:

<?php

namespace Module\Checkout\Plugin\Block;

class LayoutProcessorPlugin
{
    public function afterProcess(\Magento\Checkout\Block\Checkout\LayoutProcessor $context, $result)
    {
        $newFields = [
            'is_residential' => 'Is Residential',
            'is_tax_exempt'  => 'Is Tax Exempt',
        ];

        $i = 1;
        foreach ($newFields as $newField => $newFieldLabel) {
            $customField = [
                'component' => 'Magento_Ui/js/form/element/checkbox-set',
                'config' => [
                    // customScope is used to group elements within a single form (e.g. they can be validated separately)
                    'customScope' => 'shippingAddress.custom_attributes',
                    'customEntry' => null,
                    'multiple' => false,
                    'template' => 'ui/form/field',
                    'elementTmpl' => 'ui/form/element/checkbox-set',
                ],
                'additionalClasses' => 'custom-field-radio',
                'dataScope' => 'shippingAddress.custom_attributes.' . $newField,
                'label' => $newFieldLabel,
                'provider' => 'checkoutProvider',
                'sortOrder' => 200 + $i,
                'validation' => [
                    'required-entry' => true
                ],
                'filterBy' => null,
                'customEntry' => null,
                'visible' => true,
                'options' => [
                    ['value' => '1', 'label' => 'Yes'],
                    ['value' => '0', 'label' => 'No'],
                ],
                'valueMap' => [
                    '1' => true,
                    '0' => false
                ]
            ];

            if ($newField == 'is_tax_exempt') {
                $customField['tooltip']['description'] = 'Text I want to display next to radio buttons';
            }

            $result['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children'][$newField] = $customField;

            $i++;
        }

        return $result;
    }
}


texts: Add an attribute to Orders and Invoices alongside SKU

texts: I would like to add an attribute "Product Code" to show alongside SKU on my orders and invoices. How can I achieve this? The extensions I find seem to be centered around changing your checkout, which I don't want to touch. And any other explanations of this seem very complicated. Is there a solution for my problem? Thanks in advance


texts: REST API: get order entity_id from order increment_id

texts: How to get order entity_id from order increment_id by REST API?


texts: Generate Search Issue when searching just few specific strings on Magento 2.3.2

texts:
When I am searching on Magento 2.3.2 website it is generating error as I have provided the image below. It generates results which looks like queries and generate on a specific string.

Please help me out.

Enter image description here


texts: Magento 2 Admin sales/order_create/index/ - there is header and footer loading

texts:
Developer,

Magento 2.3
Click Create New Order then redirect to sales/order_create/index/ - there are header and footer loading

  Looking for the help


texts: How to use orderCollectionFactory and productCollectionFactory together in Model file?

texts:
I have created a custom attribute in product and saved a string in that value and I want if some one order those product of same value string i want that collection of product.
So, i want to use
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
\Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory

these together is there a way to get these product.


texts: Static content served from http://localhost instead of http://localhost:8888

texts:
Probably a simple question but I have installed magento 2.4 and I am getting console errors like the one below:
Access to font at 'http://localhost/magento2/pub/static/version1610053755/frontend/Magento/luma/en_GB/fonts/opensans/light/opensans-300.woff2' from origin 'http://localhost:8888' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This looks to me because it is requesting the static resources from http://localhost instead of http://localhost:8888.
Does anyone know how to change this behavior.


texts:
I want to over-ride title phtml file so i copied it from

F:/xampp/htdocs/magento2/vendor/magento/module-theme/view/frontend/templates/html/title.phtml

Magento\Theme\Block\Html\Title.phtml

To

F:\xampp\htdocs\magento2\app\design\frontend\GWtheme\GW\templates\html\title.phtml

Here Gwtheme\Gw is custom theme foldernames

But when i flush cache and check the files seems not be over-ridden.


texts:
having an issue displaying the best tier price in Magento 1.7

The code below works perfectly well but it's only getting the first array price, so it's not the best possible multi buy tier price.

<?php
                    /* get the data */

                    $my_tier_rocks = $this->getTierPrices();
                    if (!empty($my_tier_rocks)){
                        $my_tier_rocks = $this->getTierPrices();

                            // Notice you may not be using formated_price_incl_tax but other field.
                            $my_tier_rocks = $my_tier_rocks[0]['formated_price_incl_tax'];

                            $_savingPercent = round((($my_tier_rocks-$_finalPrice)/$my_tier_rocks)*100,1);

                    ?>
                    <? /* let's print the data */ ?>
                    <? /* Use the HTML you want just notice the $my_tier_rocks var */ ?>

                        <?php echo $this->__('Multi Buy Price:') ?>
                        <?=$my_tier_rocks?>

                    <?php $_savingAmount = $_regularPrice-$_finalPrice; ?>

                    <? } /*end showing tier prices */ ?>

Any help to show the best tier price would be great, thanks you in advance.


texts: Incorrect $this object inside a module's phtml file

texts:
I'm using two modules: Webtex_CustomerPrices and FireGento_MageSetup.

There's a block created inside customtierprices.xml(Webtex_CustomerPrices module):

<catalog_product_view>
    <reference name="content">
       <block type="customerprices/catalog_product_price" name="customtierprices">
           <action method="setTemplate">
               <template>customerprices/customertierprices.phtml</template>
           </action>
       </block>
    </reference>
</catalog_product_view>

When I write this code in customtierprices.phtml, before any other code:

echo get_class($this);

I'm getting this output: FireGento_MageSetup_Block_Catalog_Product_Price

How is that possible? In the .xml file it is clearly stated that it should be an instance of customerprices/catalog_product_price

Thanks!


texts: Super Attribute Position on Product Page Magento 1

texts:
Hello Good Day to All

I have Attribute "Malakas","Mahina","Payat"

On a Product Page it will Show

Malakas
--Choose an Option--
Mahina
--Choose an Option--
Payat
--Choose an Option--

Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ??

Payat
--Choose an Option--
Malakas
--Choose an Option--
Mahina
--Choose an Option--

I already try the Position and still not working on product view Page only the Left side bar is working for Postion

the Option Drag and Drop while Create product can be use but is there a way to make it default attribute

or is there a ways to change the code on the configurable Product Option so to use Attribute Position ?

Thank


texts: Invalid response line returned from server: HTTP/2 200 - message after update to 2.1.7

texts:
I seem to be getting this message after i updated to Magento 2.1.7 - it only displays on the contact page when someone submits the form.

Invalid response line returned from server: HTTP/2 200

I see this in the magento log file:

  main.CRITICAL: Notice: Array to string conversion in
  /home/xxx/public_html/vendor/magento/module-catalog/Block/Product/View/Attributes.php
  on line 83 [] []


texts: Magento 2.3.1 product detail page is very slow

texts:
The TTFB is on 29 seconds and its taking 55+ seconds to load the product detail page.
We have varnish cache enabled, product mode enabled, JS and CSS minified already and expiry headers and other optimizations are also completed.
We have around 300K products. Do you have any suggestions?