texts:
I have a very weird problem when trying to extend Magento2 API, I followed all the right steps, however im getting this syntax error when calling http://appfactory.loc/index.php/rest/V1/appfactory/categories , although im pretty sure it's not a syntax thing, i rechecked the syntax for each file several times.

{
  "messages": {
    "error": [
      {
        "code": 500,
        "message": "Fatal Error: 'syntax error, unexpected 'interface' (T_INTERFACE)' in 'C:\\stage\\appfactory-magento2\\app\\code\\AppFactory\\Basic\\Api\\CategoryInterface.php' on line 5",
        "trace": "Trace is not available."
      }
    ]
  }
}

My structure is as follows:

AppFactory/Basic/etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

    <route url="/V1/appfactory/categories" method="GET">
        <service class="AppFactory\Basic\Api\CategoryInterface" method="getList"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>

    <route url="/V1/appfactory/categories/:id" method="GET">
        <service class="AppFactory\Basic\Api\CategoryInterface" method="getById"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>

</routes>

AppFactory/Basic/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="AppFactory\Basic\Api\CategoryInterface"
                type="AppFactory\Basic\Model\Api\Category" />
</config>

AppFactory/Basic/Model/Api/Category.php

namespace AppFactory\Basic\Model\Api;
use AppFactory\Basic\Api\CategoryInterface;

class Category implements CategoryInterface{

    /**
     * Return all the filterable attributes for this category
     *
     * @return array
     */
    public function getById( $id ){return "Test"; }
public function getList() {return "Test2";}
}

AppFactory/Basic/Api/CategoryInterface.php

<?php

namespace AppFactory\Basic\Api;

interface CategoryInterface
{

    public function getById( $id );
    public function getList();
}


texts: Profiler is always overwriting the CSV file to debug multiple subsequent requests

texts:
I have enabled the profiler in order to find out which events are triggered during order creation and processing.

php bin/magento dev:profiler:enable csvfile

But it is alway overwriting

var/log/profiler.csv

On each request.

How can I keep all profiler output across requests?


texts: Get customer first name on review request transactional email

texts:
I want to send a review request using the transaction emails.
For this I use the official Mandrill extension for Magento.

In this e-mail I want to get the customers first name.

What {var} do I need to use?

I tried this line but that did not work: {{htmlescape var=$order.getCustomerFirstname()}}

Thanks


texts: Can I build SaaS based e commerce platform using Magento?

texts:
I am thinking of building a SaaS based e commerce model like Shopify.in. So, that I can sell e commerce at lower rates to the audience in local region with template based design approach.

Is it possible to do so?


texts: How to extend core UI Component in Magento 2

texts:
I've tried to bring Sales -> Shipments grid into my extension. It works fine when I use this in my layout file .xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="styles"/>
    <body>
        <referenceContainer name="content">
            <uiComponent name="sales_order_shipment_grid"/>
        </referenceContainer>
    </body>
</page>

But there is a problem. I need to add some more columns to the grid in my extension, but I don't want those columns to be appeared in Sales -> Shipments grid.
I've tried the solution in this link to add new column to the grid How to add new column to core module of admin grid in Magento2
But those columns appear in both places (which I don't want to)
I think the best solution here should be some kind of mechanism to "extends the core UI component", but I don't know how can do this in Magento 2.
How can I do this?
Thank you.


texts: Magento 2 Viva wallet Checkout (Exception): Unable to create order code does not support currency '978'

texts: Exception #0 (Exception): Unable to create order code (Person 691e86c8-c565-4aa4-beb8-329173fcf54b does not support currency '978')


texts:
I currently use a code to display some content in my Magento shop.
But now I want to split the loaded content based on even/odd into two different divs.

My current code is displayed below.

How can I split the code based on even/odd so that I get to
.

I want two div's
 and

But inside that div only the content of the even or odd should be displayed.

So that I get two main divs, two display left/right.

How can I achieve that, so that I split the foreach code?

Current code:

<?php if($_additionalgroup = $this->getAdditionalData()): ?>

<?php echo $this->__('Additional Information') ?>

    <?php $i=0; foreach ($_additionalgroup as $_additional): $i++; $oddEven =($i % 2) ? 'odd':'even';?>
    <div class="block-specs-<?php echo $i?>">
        <h3 class="specs-<?php echo $i?>"><?php echo $this->__( $_additional['title'] )?>

        <table class="data-table specs-<?php echo $i?>" id="product-attribute-specs-table-<?php echo $i?>">
            <col width="25%" />
            <col />

            <?php foreach ($_additional['items'] as $_data): ?>
             <?php $_attribute = $_product->getResource()->getAttribute($_data['code']);
    if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>

                    <?php echo $this->htmlEscape($this->__($_data['label'])) ?>
                    <?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

            <?php } ?>
            <?php endforeach; ?>

    <?php endforeach; ?>

<?php endif;?>


texts: Choice between invoice or casual receipt during placing an order

texts:
I want to give clients possibility to choose between invoice or casual receipt during placing an order. I use magento 1.9.2.2. I was looking for options to do that but it seems that it doesn't exist.
I feel in my bones that there is easy solution for that.
Thanks for helps!


texts: Css and admin panel not working in Magento 2 Community Edition

texts:
Hello I have installed Magento2 on my local Server in Ubuntu 14.

I downloaded it from official magento website without sample data.

I installed it and I am got this screen

When I clicked on frontend url i got this screen

When I clicked on Admin Url I got this screen

I am not getting what went wrong from my side any help will be appreciable


texts: Save event on Magento custom admin extension

texts:
is there any event in admin

for when save item or save and continue button pressed in my custom extension?


texts: Display discount in Layered navigation filter

texts:
I have added attribute in the admin side for the percentage of discount. I have to display discount with percentage in the layered navigation filter. with discount range like 10% - 20%, 20% - 30% etc.

I am not getting any solution for this.

Please advice.


texts:
I have been trying to apply the latest Magento security patches but I have failed due to the web server where I have the web shop does not allow me to unpack Magento's patches via SSH.

I tried intead to make a copy of the web shop to my local mac along with a database copy and set it up on XAMPP. Could not do that either because the database is around 300Mb big and for some reason it wasn't working even after I changed the max file size and max execution time on the php.ini.

I tried the to update via PHP but then again, I hade the same problem as in the beginning: My web server does not allow me to unpack SSH files.

Last but not least, I tried this approach except I did not have any Magento 1.7 but an old Magento 1.9.1.0 contra a brand new Magento 1.9.2.0 with all the patches already applied. I got as well an error.

Are there any other ways to make the update?

Thanks in advance!


texts: how to convert M1 password hash to M2 password hash

texts:
how to convert Magento 1 password hash to Magento 2 password hash?

for example:

M1 password hash of qwer@123 (password)

547e98d8739f52b1ac5759d6b0ec6813:q9n6S6pewXbHANHML6TRujGOigDA5CSo

M2 password hash of qwer@123 (password)

b3ef5674b8ae2a4ce0cefb10671fb5b2546475b020548275cad2ea070f2d435c:pQJccCQInyMFaDzVyqCbYCGE56o6avDo:1

I need to convert

547e98d8739f52b1ac5759d6b0ec6813:q9n6S6pewXbHANHML6TRujGOigDA5CSo -> b3ef5674b8ae2a4ce0cefb10671fb5b2546475b020548275cad2ea070f2d435c:pQJccCQInyMFaDzVyqCbYCGE56o6avDo:1

any help would be much apreciated


texts: Need to extend credit-card-type.js for master card detection and add new/latest regex pattern(resolved by myself)

texts:
Need to extend credit-card-type.js for add master card detection new/latest pattern:

I am creating and extending payment method using this link http://inchoo.net/magento-2/implementing-payment-gateway-magento-2/

Its working fine ... just not detecting master card type until I put all 16 digit of the credit card this is the problem i am facing

As of my understanding and research magento making credit-card-type.js at below path:

\pub\static\frontend\Magento\luma\en_US\Magento_Payment\js\model\credit-card-validation\credit-card-number-validator\credit-card-type.js

need to override this for add/update new pattern for master card detection like below link: https://stackoverflow.com/a/72801/3820040

Checking if anyone have the resolution of the issue...
Please let me know if you can help.


texts: I want to export all the customers who used a coupon

texts:
We recently sent out an email with individual discount codes in.

I want to now extract all of the customers that used the discount code so that we can eliminate them from our next email.

I cannot find how to export these customers, is it possible?


texts: Magento 2 : Exclude CSS from merged file just for the homepage

texts:
I have merge and minify CSS enabled and I would like to know if is there a way to exclude a specific CSS file from the final merged file, but only for the homepage?

I know how to remove a CSS file from the header via XML layout...

<remove src="css/styles-m.css" />

But can you remove/exclude this from the final compiled CSS file, just for the homepage?

Thanks!


texts: Magento 2.X : what are people doing about different versions

texts:
After upgrading from 2.1.9 to 2.2.0 on two of our current magento sites, its apparent that the process is somewhat easy and difficult at the same time.

Yes composer makes going from 2.1.9 to 2.2.0 is easier than ever before but it feels that so many things have broken. Even on a site, which is a pretty straight forward Magento 2 build. Lots of core changes and different functionality but also causing lots of bugs in the theme ( and trust me the theme isn't overly complex. )

So to the question.

My simple question is, what are people doing in regards to the upgrades, are you sticking with 2.1.9 and then leaving the client on this for the life span of the site ( obviously patching as time goes by. ) and then when a client is on 2.2 or 2.3 they will stay with that version for the duration of their site life span?

Or are they upgrading to 2.2 then 2.3 because if 2.2 is anything to go by 2.3 will be the same and again for 2.4 - it will just cause headache after headache.

Now I would be torn because, having the latest and greatest is always the way forward for me, but if it means pain to upgrade, why bother for a simple feature the client may not need? - but at the same time the upgrade might fix bugs that may never be patched and we are expected to upgrade to fix?

I feel as though as its question that no one really talks about or has asked.


texts:
I would like to set my ID on the category Category::setId but this results in the following exception: "No such entity with id = x".

My code:

$catFactory = $objectManager->get(CategoryFactory::class);
$catRepo = $objectManager->get(CategoryRepositoryInterface::class);
$cat = $catFactory->create();
$cat->setId(100);
...
$catRepo->save($cat);

Thank you.


texts: Magento 1.x Get customer billing address

texts: Magento 1.x How to get a customer billing address in my custom module controller file?


texts: Creating custom event observer for after sale

texts:
I'm attempting to create a custom observer that will trigger after a successful purchase has been made. I assume that sales_order_save_after is the correct event to use.

What the Observer will do is check to make sure the order is coming from the correct store, and then add some data into a new table. I thought I had done it correctly, but couldn't get it to work. After a bit of changing some things, I eventually glitched my test account I was making purchases on. It now receives this error whenever trying to checkout: Payment has already been made for this InvoiceID (#10412: Duplicate invoice)

Regardless, this is what I have:

Observer.php

<?php

class Namespace_Module_Model_Observer {

    public function saveData(Varien_Event_Observer $observer) {

    $order = $observer->getEvent()->getOrder();
    $storeId = $order->getStoreId();

    $incrementId = $order->getIncrementId();
    $entity_id = $order->getEntityId();

    if($storeId == 3){
       // saving data via query
    }

config.xml

<config>

<global>
    <models>
        <namespace>
            <class>Namespace_Module_Model</class>
        </namespace>
    </models>
    <events>
        <sales_order_place_after>
            <observers>
                <namespace_module_savedata>
                    <class>Namespace_Module_Model_Observer</class>
                    <method>saveData</method>
                    <type>singleton</type>
                </namespace_module_savedata>
            </observers>
        </sales_order_place_after>
    </events>
</global>
</config>

Is everything here look correct? I just realized I had Namespace_Module_Model_Observer/observer as the class before copying the code here. However, prior to that, I was still getting nothing for the most part. No errors/exceptions. I haven't tried adding an actual log dispatch to the observer yet though.  Would that just be:
Mage::log($observer->getEvent()->getName(),null,'event.log');?


texts:
create coupon code that should apply only for new accounts.

I created a coupon code to give discounts for customers .

that coupon code is working for all customer accounts

but i want that coupon code to apply only for new customers/new accounts.

please help me to find solution.

thanks in advance


texts: Magento 2 Not Showing any Custom Payment Method on Checkout Page

texts: I have installed several custom payment methods from magento marketplace. And after enabled them when going to checkout page there is no any custom payment method visible.


texts: Welcome mail is not send during checkout

texts:
If I register a new user during checkout only the order mail is send to the user. Not the welcome mail. If I register a new user on

  /customer/account/create/

the welcome mail is send.

Is this normal? Is there a setting to change this?

Update

I found this function _involveNewCustomer() in

app/code/core/Mage/Checkout/Model/Type/Onepage.php:745

Looks to me like this mail should have been send during checkout. Still wonder why it did not?


texts: Magento 2 - Customize customer grid in admin panel

texts:
is it possible modify customers list in admin customer grid?
For example I would list only customers by an attribute value, like email domain or like country.
Thank You!!


texts:
Please help.
Want to add new checkout step with custom form


texts: Category Label crums are not displaying in multi-select view in edit form admin magento 2?

texts:
I am creating the category restriction module, when i edit particular record then all data are filled fine except category (Label Crums).

In edit page, multi-select categories are selected but label crums are not displaying in field.

I want to get like below::

Please help me.


texts: Broken output when using images with WYSIWYG on Magento 2

texts:
I'm trying to use WYSIWYG as a field on my costume Widget, but when I try to show the content it returns broken text:

{{widget type="Hibrido\WidgetCertificateMedia\Block\Widget\CertificateMedia" media_type="Token" certificate_type="AWP" used_device="Windows" content_file="

Teste

"}}

What it return:

My code:
<?= htmlspecialchars_decode($block->getContentFile(), ENT_QUOTES) ?>

getContentFile() get the Wysiwyg content


texts: URL Key becomes Hyphenated after Products Import?

texts:
I have set the URL Key fields in the Dataflow Products Import to a value with no spaces or hyphens. I have also set certain Products to more than one Category, e.g. New and Austria for certain beer glasses.

The problem I see is that in the URL Rewrite Management and the individual Products, I'm seeing hyphens between the words in the URL Key of the Products, e.g. "zipfer-beer-pitcher-large-1-5-litre" (this the actual Title text of the Product) instead of "zipferbeerpitcher" as specified in the CSV Import file.

Do I need to change any code or settings?


texts:
How to sync staging and production database?
I have staging database and i want to sync it with production database. Production database contains new customers and sales order. I dont want to replace customers and sales orders tables. What is the correct way to import staging database into production database without replacing orders and new customers.

** I know there are lot of magento stores and every one is dealing with same kind of situation.Please share correct way of doing this. Thanks


texts: Update backend model of product attribute with setup script

texts:
I need to add the backend_model value of an attribute where wasn't specified in the install setup script. The missing line is:

'backend' => 'eav/entity_attribute_backend_datetime'

But so far using just this line in an upgrade script

$installer  = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();

$installer->updateAttribute('catalog_product', 'custom_date', array(
'backend' => 'eav/entity_attribute_backend_datetime'));

$installer->endSetup();

Is not updating the column backend_model in the ear_attribute table. So I'm forced to use

$installer  = Mage::getResourceModel('catalog/setup', 'catalog_setup');

$installer->startSetup();

$installer->removeAttribute('catalog_product','custom_date');

$installer->addAttribute('catalog_product', 'custom_date', array(
    'label' => 'Launches - Release Date',
    'type'      => 'datetime',
    'input'     => 'date',
    'class'     => 'validate-date',
    'global'    => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'required'  => false,
    'user_defined' => false,
    'searchable' => false,
    'filterable' => false,
    'comparable' => false,
    'visible_on_front' => false,
    'unique' => false,
    'used_in_product_listing' => true,
    'backend' => 'eav/entity_attribute_backend_datetime'
));

$installer->endSetup();

Any idea if is actually possible to update the backend_model in an upgrade script.


texts: Magento 2 Error occured after upgrade : Warning: ltrim() expects parameter 1 to be string, array given

texts:
Getting following error while compilation using this command : php bin/magento setup:di:compile after upgrade Magento 2.1.7 to 2.1.9 check below error for more information :

  Warning: ltrim() expects parameter 1 to be string, array given in
  /MagentoRoot/setup/src/Magento/Setup/Module/Di/Compiler/Config/Chain/BackslashTrim.php
  on line 61


texts: Magento 2 doesn't resolve my own Repository Interface in the custom module

texts:
I'm trying to create a custom module for Magento 2. when I try to inject the ThreadRepositoryInterface into the controller constructor the code fails.

This is the error:

Fatal error: Uncaught Error: Cannot instantiate interface Mycompany\Tickets\Api\ThreadRepositoryInterface in /var/www/html2/magento2.local/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

this is the structure of the module:

.
├── Api
│   ├── AttachmentRepositoryInterface.php
│   ├── CategoryRepositoryInterface.php
│   ├── Data
│   │   ├── AttachmentInterface.php
│   │   ├── AttachmentSearchResultsInterface.php
│   │   ├── CategoryInterface.php
│   │   ├── CategorySearchResultsInterface.php
│   │   ├── StatusInterface.php
│   │   ├── StatusSearchResultsInterface.php
│   │   ├── ThreadInterface.php
│   │   ├── ThreadSearchResultsInterface.php
│   │   ├── TicketsInterface.php
│   │   └── TicketsSearchResultsInterface.php
│   ├── StatusRepositoryInterface.php
│   ├── ThreadRepositoryInterface.php
│   └── TicketsRepositoryInterface.php
├── Block
│   ├── Create
│   │   └── Form.php
│   ├── Index
│   │   └── Tickets.php
│   └── Reply
│       └── Index.php
├── composer.json
├── Controller
│   ├── Create
│   │   └── Index.php
│   ├── Index
│   │   ├── Fastlink.php
│   │   └── Index.php
│   └── Reply
│       └── Index.php
├── etc
│   ├── acl.xml
│   ├── adminhtml
│   │   ├── menu.xml
│   │   ├── routes.xml
│   │   └── system.xml
│   ├── config.xml
│   ├── di.xml
│   ├── email_templates.xml
│   ├── frontend
│   │   └── routes.xml
│   ├── module.xml
│   └── webapi.xml
├── Helper
│   ├── AbstractData.php
│   └── Data.php
├── LICENSE.txt
├── Model
│   ├── Attachment
│   │   └── DataProvider.php
│   ├── Attachment.php
│   ├── AttachmentRepository.php
│   ├── Category
│   │   └── DataProvider.php
│   ├── Category.php
│   ├── CategoryRepository.php
│   ├── Config
│   │   └── Source
│   │       └── Tickets
│   │           └── Status.php
│   ├── ResourceModel
│   │   ├── Attachment
│   │   │   └── Collection.php
│   │   ├── Attachment.php
│   │   ├── Category
│   │   │   └── Collection.php
│   │   ├── Category.php
│   │   ├── Status
│   │   │   └── Collection.php
│   │   ├── Status.php
│   │   ├── Thread
│   │   │   └── Collection.php
│   │   ├── Thread.php
│   │   ├── Tickets
│   │   │   └── Collection.php
│   │   └── Tickets.php
│   ├── Sendmail.php
│   ├── Status
│   │   └── DataProvider.php
│   ├── Status.php
│   ├── StatusRepository.php
│   ├── Thread
│   │   └── DataProvider.php
│   ├── Thread.php
│   ├── ThreadRepository.php
│   ├── Tickets
│   │   └── DataProvider.php
│   ├── Tickets.php
│   ├── TicketsRepository.php
│   └── TicketsSearchResult.php
├── registration.php
├── Setup
│   ├── InstallData.php
│   └── InstallSchema.php
└── view
    └── frontend
        ├── email
        │   └── ticket_new.html
        ├── layout
        │   ├── customer_account.xml
        │   ├── tickets_create_index.xml
        │   ├── tickets_index_fastlink.xml
        │   ├── tickets_index_index.xml
        │   └── tickets_reply_index.xml
        └── templates
            ├── form
            │   ├── register.phtml
            │   └── reply.phtml
            └── list.phtml

36 directories, 76 files

Any idea?


texts: Products disapearing from a category but reappear after reindex/clear cache

texts:
I have a Magento 1.14.2.` store with about 1500 products in about 50 categories and sub-categories.

A small number of products (2 dozen?) in a few particular categories regularly "disappear" every few minutes from a handful of categories, but not the other categories that they may be assigned to. Other products in the affected categories appear at all times.

The missing products reappear when I manually re-index and clear the FPC manually.

These are "old" products and categories that I've had on the site for a few years (without any known issues) and not newly imported or anything. I've checked the visibility/status settings for the products, etc. and the category settings, etc. but don't see anything unusual. Also, these few products seem to behave exactly as expected when assigned to other categories.

I've tried clearing the category assignments for these affected products and reassigning them--that seems to have worked in the past when something like this was going on--but not this time. I've recreated some of the affected categories, but that doesn't seem to help either.

Does anyone have an idea what might be causing this or how to correct it?


texts:
I've enabled redis for session, have the latest extension and lib code from github, and I'm noticing some requests take around 30 seconds - and this is happening pretty frequently, and it's always redis which is to blame.

Here are 3 transaction traces from newrelic, they look pretty much the same to me:
http://imgur.com/JQUzheJ,0sCqUni,3L4PJAX

I am using the following settings in redis:

    <redis_session>
            <host>127.0.0.1</host>
            <port>6379</port>
            <password></password>
            <timeout>2.5</timeout>
            <persistent></persistent>
            <db>2</db>
            <compression_threshold>2048</compression_threshold>
            <compression_lib>lzf</compression_lib>
            <log_level>4</log_level>
             <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
            <max_concurrency>12</max_concurrency>
            <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
            <break_after_frontend>5</break_after_frontend>
            <break_after_adminhtml>30</break_after_adminhtml>
            <!-- Bots get shorter session lifetimes. 0 to disable -->
            <bot_lifetime>7200</bot_lifetime>
    </redis_session>

At the moment, only one frontend server is being used for magento.

Thanks!


texts: SUPPE-10266 ERROR: Failing on view.phtml

texts:
The patch is not installing properly. Here is the error:

patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php
patching file app/code/core/Mage/Adminhtml/Controller/Action.php
patching file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php
patching file app/code/core/Mage/Adminhtml/controllers/CustomerController.php
patching file app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php
patching file app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
patching file app/code/core/Mage/Checkout/controllers/CartController.php
patching file app/code/core/Mage/Core/Model/Email/Template/Abstract.php
patching file app/code/core/Mage/Core/Model/File/Validator/Image.php
patching file app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
patching file app/code/core/Mage/Core/etc/config.xml
patching file app/code/core/Mage/Rss/Helper/Data.php
patching file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
patching file app/code/core/Zend/Serializer/Adapter/PhpCode.php
patching file app/design/adminhtml/default/default/template/backup/dialogs.phtml
patching file app/design/adminhtml/default/default/template/catalog/product/edit/options/type/file.phtml
patching file app/design/adminhtml/default/default/template/customer/tab/view.phtml
Hunk #1 FAILED at 70.
1 out of 1 hunk FAILED -- saving rejects to file app/design/adminhtml/default/default/template/customer/tab/view.phtml.rej
patching file app/design/adminhtml/default/default/template/login.phtml
patching file app/design/adminhtml/default/default/template/notification/toolbar.phtml
patching file app/design/adminhtml/default/default/template/oauth/authorize/form/login-simple.phtml
patching file app/design/adminhtml/default/default/template/oauth/authorize/form/login.phtml
patching file app/design/adminhtml/default/default/template/resetforgottenpassword.phtml
patching file app/design/adminhtml/default/default/template/sales/order/view/history.phtml
patching file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
patching file app/design/install/default/default/template/install/create_admin.phtml
patching file app/locale/en_US/Mage_Adminhtml.csv
patching file downloader/template/login.phtml

As you can see it is failing on:

patching file app/design/adminhtml/default/default/template/customer/tab/view.phtml
Hunk #1 FAILED at 70.
1 out of 1 hunk FAILED -- saving rejects to file app/design/adminhtml/default/default/template/customer/tab/view.phtml.rej

Here is my view.phtml file:

        <?php echo $this->__('Customer Group:') ?>
        <?php echo $this->escapeHtml($this->getGroupName()) ?>

I have checked the file against a mirror copy of the Magento view.phtml and the code is:

        <?php echo $this->__('Customer Group:') ?>
        <?php echo $this->getGroupName() ?>

There is $this->escapeHtml missing but even when I remove this (or even use the Magento mirror copy of the view.phtml file) the patch still fails at that point.

Also:

1 out of 1 hunk FAILED -- saving rejects to file app/design/adminhtml/default/default/template/customer/tab/view.phtml.rej

Is not creating any file like this. Due to permissions? If so what permission should I change?


texts: How can i import a core translation into my own module?

texts:
I found posts about how to let Mage use my own translation in core modules,

but not the other way.

What im trying is:

I overwrite core templates - in example module Mage_Sales.

The Block is like class My_Module_Block_My_View extends Mage_Core_Block_Template

The config.xml:

...
    <frontend>
...
        <translate>
            <modules>
                <My_Module>
                    <files>
                        <default>My_Module.csv</default>
                        <need_this_too>Mage_Sales.csv</need_this_too>
                    </files>
                </My_Module>
            </modules>
        </translate>
...
    </frontend>

I think i tried every combination -- from using path app/locale/de_DE/Mage_Sales.csv to translate>modules>Mage_Sales>files>default>Mage_Sales.csv but nothing works.

Is there a way to import core translation .csv to my module ?


texts: Make changes in the product page without changing core files

texts:
I have a .html file which is essentially a little gallery program that takes a series of pictures of a product and combines them to let the user rotate the product 360 degrees.

I am looking to make some sort of extension that would allow me to inject the .html file in the product page. (Possibly some example code which would allow me to create my own extension)

Or maybe if anyone knows any other way of doing this without modifying the core files on magento.

P.S.
I am using magento 1.9.2.4


texts: remove text/table entry 'shipping & handling' everywhere in magento

texts:
I was able to remove it from the checkout page. But it is still in the my order review page as well as the print version of the order. So far I didn't find it anywhere else. But is there a way to not show it in the frontend?

I changed Shipping.php and totals.phtml (all of them) but no matter what I commented or tried had any influence on it. Where do I have to change this?


texts:
Magento Enterprise 1.14.0.1

I have a plugin that I am altering the IndexController file for so that it will insert data collected from a user into a database table I created.

So basically I altered the Magento database to have new table which I am calling
sample_requests. My issue is that when the IndexController is fired nothing is being inserted into the database. All database columns are Varchar(255) with the exception of the request_date column which is a datetime column type.

below is my code which I have in the IndexController.php file

    $personal_name = 'test';
    $customer_email = 'boo';
    //Open Database Conenction
      $resource = Mage::getSingleton('core/resource');
      $writeConnection = $resource->getConnection('core_write');

      //The Query
        $query = "insert into magento.sample_requests
                       (first_name, last_name, email_addr, address, city, state, zip, country, customeri_id, request_date)
                  values($personal_name, NULL, $customer_email, sdf, sdf, sdf, sdf, sdf, 0, NOW())";

        $writeConnection->query($query);


texts: Magento 2 : Reformat Shipping Address in Review & Payments Section

texts:
I create custom attribute for shipping address, after finishing checkout I can see custom attribute below telephone number. I want to change address format to my preference. below is the example of address format which I got after filled shipping method:

here's the code to add new custom attributes field:

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['subdistrict'] = [
            'component' => 'Magento_Ui/js/form/element/select',
            'config' => [
                'customScope' => 'shippingAddress.custom_attributes',
                'template' => 'ui/form/field',
                'elementTmpl' => 'ui/form/element/select',
            ],
            'dataScope' => 'shippingAddress.custom_attributes.subdistrict',
            'label' => 'District',
            'provider' => 'checkoutProvider',
            'visible' => true,
            'validation' => [
                'required-entry' => true,
            ],
            'sortOrder' => 71,
            'id' => 'subdistrict',
            'options' => [
                [
                    'value' => '',
                    'label' => 'Please Select Your Subistrict',
                ]
            ]
        ];


texts: Checkout error - No such entity with cartid

texts:
when we make check out get the below error  Can you please advise me
no such entity with cartid magento 2.3.2

https://i.ibb.co/PmhZGPV/2020-01-07-115625.jpg


texts: New page in custom module does not obey module_controller_action.xml

texts:
I'm adding a new page for my company, and that requires the use of a module. After some searching, I got the routes to function. However, the page doesn't seem to load the block/template as defined in my module_controller_action.xml file.

Module structure for as far as relevant:

-+ MyCompany
 -+ CustomRouter
  -+ Controller
   -+ Test
     - Test.php (Gets called as expected)
   - Router.php
  -- etc/...
  -+ view
   -+ frontend
    -+ layout
      - customrouter_test_test.xml
    -+ templates
      - configure_price_list.phtml

I'm using a block from Magento/Customer/Blocks/Account/Dashboard/Info. This block already has all that I need. I tried using an exact copy, but didn't notice any change.

My files:
Test.php:

<?php
namespace MyCompany\CustomRouter\Controller\Test;

use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Test extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    { // This function gets called 100% when expected, so the problem isn't in the router
        $this->_view->loadLayout();
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->set(__('Configure Price List'));
        return $resultPage;
    }
}

customrouter_test_test.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" layout="1column">

        <referenceContainer name="content">
            <block class="Magento\Customer\Block\Account\Dashboard\Info" name="configure_price_list" template="configure_price_list.phtml" cacheable="false" />
        </referenceContainer>

</page>

configure_price_list.phtml:

<?php
// Made by (my name)
 ?>

Template Loaded

The page loads, and the page title gets displayed as I set it in Test.php. However, none of the content displays, as if customrouter_test_test.xml does not exist. Is there anyone who can point me to the missing link here ?

(Did try to watch a number of tutorials, according to them, current setup should work.)

EDIT:
After request, here's routes.xml:

<?xml version="1.0"?>

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

And at the risk of stating the obvious, I'm loading [domain]/customrouter/test/test. I'm also loading another url I redirected with a custom router, which looks exactly the same (just the page heading I set in Test.php).

EDIT 2: I might have found a solution. But I'm still working on what caused the problem. currently im file-for-file switching a working custom action to act exactly like mine.


texts: Layer Navigation on custom collection Magento 2

texts: We have created custom extension for clearance sale products. Collection based on the Product attribute which we have created for clearance sale.We have Block file which contains the Collection.We have follow the Webkul blog for the Navigation but we can not get success. Can anyone help us. Any kind of help will be appreciated.


texts: How to change meta description dynamically on product details page in Magento 2

texts:
I want to change meta description and title dynamically on product details page.

Meta description should be catagory Name  + product name.


texts: Magento 2 : product collection ASC sort by category

texts:
I want to sort product collection by category ids. I used this below code. What i need to add in this code ?

/**
 * @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory
 */
protected $productCollectionFactory;

public function __construct(
    .....
    \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
    .....
) {
    .....
    $this->productCollectionFactory = $productCollectionFactory;
    .....
}

publi function yourfunction()
{
    $catalog_ids = ['14', '61', '62', '63'];
    $productCollection = $this->productCollectionFactory->create();
    $productCollection->addCategoryIds()->addCategoriesFilter(['in' => $catalog_ids])->addAttributeToSelect('*');
    $productCollection->addAttributeToFilter('size_mm', ['eq' => 2650]);
    $productCollection->setOrder('size_mm', 'DESC');
    $productCollection->setOrder('entity_id', 'ASC');
    return $productCollection;
}


texts: What is a Magento 2 "Design Abstraction"

texts:
In the Magento 2 layout loading code, there's the following method

public function getAllDesignAbstractions()
{
    $result = [];

    $conditions = [
        '(@design_abstraction="' . self::DESIGN_ABSTRACTION_PAGE_LAYOUT .
        '" or @design_abstraction="' . self::DESIGN_ABSTRACTION_CUSTOM . '")',
    ];
    $xpath = '/layouts/*[' . implode(' or ', $conditions) . ']';
    $nodes = $this->getFileLayoutUpdatesXml()->xpath($xpath) ?: [];
    /** @var $node \Magento\Framework\View\Layout\Element */
    foreach ($nodes as $node) {
        $name = $node->getAttribute('id');
        $info = [
            'name' => $name,
            'label' => (string)new \Magento\Framework\Phrase((string)$node->getAttribute('label')),
            'design_abstraction' => $node->getAttribute('design_abstraction'),
        ];
        $result[$name] = $info;
    }
    return $result;
}

What is a Magento 2 design abstraction?  I've poked around the Frontend developer's guide and other sections on the dev docs site, but I can't seem to find any information about this feature there.  Is this something that's still used in Magento 2?  Or is it something that's been abandoned?


texts: How to apply a "buy two products together and save some money" block on product page in magento?

texts:
I am trying to make a block which shows two products in it with a rule that if a customer bought these two products he will save some amount of money.
I want to do something like this, Can any one let me know how can i do that.
I tried reading the content for shopping cart price rule and catalog price rule but didn't get how to make this type of product rule.
Thanks in advance.


texts: Magento 1: search term is not being added back

texts:
Ok here is the scenario, I've tested that on a fresh Magento 1.9.2.4 with sample data.

Let's say I have a search term that is "tee".

1st Test

remove all synonyms for "tee"
delete "tee" from the search terms
search for "tee" in the frontend
"tee" is added back to the search terms
add synonyms for "tee" (example: if I edit "t-shirt" search term and I add "tee" in the "Synonym For" entry)
search for "tee" in the frontend
"tee" number of uses is increased by 1

2nd Test

remove all synonyms for "tee"
delete "tee" from the search terms
search for "tee" in the frontend
"tee" is added back to the search terms
add synonyms for "tee" (example: if I edit "t-shirt" search term and I add "tee" in the "Synonym For" entry)
EXTRA STEP HERE: delete "tee" from the search terms
search for "tee" in the frontend
"tee" is not being added back to the search terms

Results

To me, that behavior is totally inconsistent, it should:

either not increase the number of uses of "tee" in the first step
or add back "tee" to the search terms with number of uses = 1 in the second step

Thus, the search reports are not accurate as if someone search "tee" as it is never added back to the search terms it will not be taken into consideration in the report.

To me it sounds like a bug but I may be missing something.

Does that behavior sound logic to you and if so could you explain me why ?


texts: Need just a little help with sprites in Magento CE 1.9

texts:
I need just a little help with sprites. I am not an expert, but I'm learning, and this it the first time I'm trying to make a sprite show on in the cms block. My sprite is spritesheet.png, an image with social icons on it. I uploaded it in public_html folder for now and I put this cone in my cms block (I had to add spaces after "<" here in my post because otherwise the code wouldn't show up)

Then I added this to my styles.css
    background-image: url(spritesheet.png);
    background-repeat: no-repeat;
    display: block;
}

.sprite-etsy {
    width: 18px;
    height: 18px;
    background-position: -5px -5px;
}

.sprite-facebook {
    width: 18px;
    height: 18px;
    background-position: -33px -5px;
}

.sprite-google {
    width: 18px;
    height: 18px;
    background-position: -61px -5px;
}

.sprite-instagram {
    width: 18px;
    height: 18px;
    background-position: -89px -5px;
}

.sprite-pinterest {
    width: 18px;
    height: 18px;
    background-position: -117px -5px;
}

.sprite-twitter {
    width: 18px;
    height: 18px;
    background-position: -145px -5px;
}

.sprite-youtube {
    width: 18px;
    height: 18px;
    background-position: -173px -5px;
}

All this was generated by a website that helps with making sprites, so it should be correct, but I still don't see the images. I see the empty CMS block though. Could you please help me understand what am I missing?
Thank you!


texts: Magento Fatal error: Call to a member function setStore() on a non-object for class Mage_GoogleCheckout_Model_Shipping

texts:
When I click the Add to cart button I'm getting the following error "Fatal error: Call to a member function setStore() on a non-object in ../app/code/core/Mage/Shipping/Model/Shipping.php"

This is the function that throws it:

   public function getCarrierByCode($carrierCode, $storeId = null)
    {
        if (!Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/'.$this->_availabilityConfigField, $storeId)) {
            return false;
        }
        $className = Mage::getStoreConfig('carriers/'.$carrierCode.'/model', $storeId);
        if (!$className) {
            return false;
        }
        $obj = Mage::getModel($className);
        if ($storeId) {
            $obj->setStore($storeId);
        }
        return $obj;
    }

This code in particular:

$obj = Mage::getModel($className);
if ($storeId) {
    $obj->setStore($storeId);
}

I have printed out the $obj and I'm getting the following object:

Mage_GoogleCheckout_Model_Shipping Object
(
    [_code:protected] => googlecheckout
    [_rates:protected] =>
    [_numBoxes:protected] => 1
    [_freeMethod:protected] => free_method
    [_isFixed:protected] =>
    [_customizableContainerTypes:protected] => Array
        (
        )

    [_debugReplacePrivateDataKeys:protected] => Array
        (
        )

    [_data:protected] => Array
        (
        )

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

    [_syncFieldsMap:protected] => Array
        (
        )

)

This Mage_GoogleCheckout_Model_Shipping class is present, it's in the right location.

I can see that the functions loads the $className in the following manner:

$className = Mage::getStoreConfig('carriers/'.$carrierCode.'/model', $storeId);

and while for the Fedex, UPS etc. methods I see entries in the core_config_data table like this carriers/fedex/something, for the Google Checkout I do not, but I see the following instead: google/checkout_shipping_carrier/active and many others that do not follow the carriers/carrierCode pattern.

Anyway, does someone know why this is happening? Thanks


texts: Magento 2: How to delete order's invoice, credit memo & shipment programmatically?

texts:
I would like to delete order's invoice, credit memo & shipment programmatically.

How to achieve this by passing only order id?


texts: how to set external js dependency for internal js in magento2

texts:
In default_head_blocks.xml I've loaded following jquery.

<link src="//maps.googleapis.com/maps/api/js"/>
<link src="js/main.js" order="101"/>

Now my situation I want map js loaded to be first but it's not working I've set the order parameter in my custom js but it's not working with external js, Even I tried with requirejs   but I'm getting following error in console.

js:85 Uncaught TypeError: Cannot read property 'firstChild' of null(…)

So what can be solution here??

EDIT
Even If I place it like following

<link src="//maps.googleapis.com/maps/api/js" src_type="url" />

This won't change anything in order...I want this file to be loaded before my custom file called.


texts: delete an order once it is converted back to a quote in EE 1.14.0.1

texts:
I have a Magento EE 1.14.0.1 and am working on a custom paypal type payment processor.

I have it all working with the exception of if once a customer gets to the external payment processors page and clicks the cancel button I have code that will when they come back to the site convert their order to a quote and direct them to their view cart page. However the order is still staying listed in the sales order page as "pending. However I want to have it removed from the sales order listing page since it has been converted back to a quote and is no longer an order.

below is the code I am using to take the order and convert it back to a quote
I am not sure what to add or alter.

   $quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
        if ($quote->getId()) {
                                $quote->setIsActive(1)
                                    //->setReservedOrderId(null)
                                      ->save();

                                Mage::getSingleton('checkout/session')
                                           ->replaceQuote($quote);
                                        // ->unsLastRealOrderId();
                                                }
                                $this->_redirect('checkout/cart');
                             }

What I want is after the order is converted to a quote to DELETE the order from being listed in the sales order page not just have it listed as cancelled.


texts:
I would not like to sell my product in below states of USA. Alaska
Hawaii, Porto Rico, po box, Military bases, APO.
How can I do that ?


texts:
I've got an 11 multi site situation where I have the sitemaps auto generated every day at 4am. It works fine but when I change the generation settings to weekly it still produces a fresh set of sitemap files each morning at 4am.

Any ideas why it would do this?


texts:
I would like to remove all customer related pages. I have already removed all links like login / register, but the pages are still accessible via the url (so people with basic Magento 2 knowledge can access these pages).

Is there a way to remove these pages, together with their url's?


texts: tier price working on view and list page but not in cart page

texts:
I have applied Tier price on my website. It shows "As low as" on list price and also applies successfully to view the product page. But when I add the product to the cart, it doesn't apply.

<?php echo $this->helper('checkout')->formatPrice($_cart_item->getCalculationPrice()) ;

This line display price in cart page. how can I apply tier price on this function?


texts: How to get list of categories including sub categories in Magento 2?

texts:
How can I retrieve a list of root categories and sub categories in Magento 2?

I want to populate a drop down box with categories in admin section.


texts: Magento2 What determines State Code and Title's Square Bracketed Value in Order Status Grid

texts:
What determines State Code and Title's Square Bracketed Value in
Order Status Grid in the below screenshot. It doesn't appear to be
the default status for that state?
If it is coming out of the database or config, where is it stored?
Does the Square Bracketed title display anywhere on the frontend or in
order processing in the backend?


texts: magento2 order status is still processing

texts:
When i create shipment and invoice for the order the status is still in processing through rest API Magento2.

The status is not changing to complete

Can anyone help me out.

Thanks


texts: How to change color / hover color of icons? - Magento2

texts:
How can I change the color and hover color of an icon, for example "icon-cart"?
I already have a custom theme.

I found this website which has a nice documentation, but I dont really understand it.
The Site: http://magento2-demo.nexcess.net/pub/static/frontend/Magento/blank/en_US/css/docs/icons.html

Thanks for your help!


texts: Why sorting modules at initialization, if in the end all the information from the configuration files of the modules will be contained in one main configuration file, which is not important the order of the tags


texts: magento 2: get Top menu in header with dropdown

texts: How to display a top menu link with dropdown in the header of my site?


texts: How to display In Stock Product only in websites scope?

texts:
I am having a problem in filtering and displaying in stock only product in websites scope.

I have 3 websites using one magento install.

I'm using Display Out of Stock Products setting in System > Configuration > Catalog > Inventory and turning it into "No", but this setting hide all out of stock product in all of my 3 websites

I only want to make it works in 1 website only

Some say, I should use Observer, but I don't know how to use it

Can anybody help me?


texts: By default there is an order # on fedex shipping label, I want to replace that with sku # but haven't had any progress with it. I'm not even sure if that's possible, but if it is, can anyone show me how?


texts: How do I change who receives contact form emails?

texts:
I have been trying to change the recipient of our contact form emails, but so far no luck. I have tried to change all 5 emails under System > Store Email Addresses and also the one under System > Contacts. No luck. Store view is set to Default Config.

I have tried to look in form.phtml, but I it looks pretty generic:

$j('#contactForm').submit(function(){
        if($j('#name').val().length < 3) {
            $j('#name, label[for="name"]').addClass('error');
        } else {
            $j('#name, label[for="name"]').removeClass('error');
        }

        if(!pattern.test($j('#email').val())) {
            $j('#email, label[for="email"]').addClass('error');
        } else {
            $j('#email, label[for="email"]').removeClass('error');
        }

        if($j('#comment').val().length < 3) {
            $j('#comment, label[for="comment"]').addClass('error');
        } else {
            $j('#comment, label[for="comment"]').removeClass('error');
        }

        if($j('#contactForm label').hasClass('error')) {
            $j('#warning').show();
            return false;
        } else {
            $j('#warning').hide();
        var formAction = $j('#contactForm').attr('action');

        var $jformItself = $j('#contactForm :input');

        var values = {};

        $jformItself.each(function() {
            values[this.name] = $j(this).val();
        });

        $j.ajax({

            type: "POST",

            url: "/js/postmail.php",

            data: values, // serializes the form's elements.

            success: function(data)


texts: How to filter products NOT IN categories?

texts:
Here is my code:

$catIds = array(7,8,9);
$collection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToSelect("*");
    ->addAttributeToFilter('category_ids', array('nin' => $catIds));

I want to get all products not in list of category ids but my code didn't give the expected result. Please show me the way, thanks.


texts: Porto blog generates sql error, any ideas?

texts:
I'm using smartwave magento theme. I can edit settings of blog, but I get the following error generated when I try and open blog categories or posts in backend.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my_database.mage_smartwave_blog' doesn't exist

Trace:

0 /home/namui/domains/namui.lt/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

1 /home/namui/domains/namui.lt/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)

2 /home/namui/domains/namui.lt/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)

.............


texts: Use of undefined constant CURLOPT_TIMEOUT - assumed 'CURLOPT_TIMEOUT' in /var/www/html/projectName

texts:
I am getting this error when trying to access my magento 2 Admin :

Notice: Use of undefined constant CURLOPT_TIMEOUT - assumed 'CURLOPT_TIMEOUT' in /var/www/html/Project/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
#0 /var/www/html/Project/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(73): Magento\Framework\App\ErrorHandler->handler(8, 'Use of undefine...', '/var/www/html/P...', 73, Array)


texts: why setup upgrade command revert back already dropped foreign key in magento 2.4.2

texts:
I have written one custom module with a simple UpgradeSchema file to drop core foreign key (table product_alert_stock, foreign key name - PRODUCT_ALERT_STOCK_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID )
ReferenceLink
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
    $setup->startSetup();

    $setup->getConnection()->dropForeignKey('product_alert_stock',
         'PRODUCT_ALERT_STOCK_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID'
    );

    $setup->endSetup();
}

And it is working very fine ( as required dropping that foreign key constraint) as I run setup:upgrade command first time to install this new custom module but when the next time I run setup:upgrade for any other purpose, that foreign key added back to the table with same name and not being dropped again, no matter how many time I run setup upgrade.
Additionally as I checked if I delete my custom module name entry from setup_module table and run setup upgarde it is dropping that foreign key and on next setup upgrade adding back again. I am guessing that as it is magento's core foreign key so somehow in upgrade, magento is adding it back but as I have written UpgradeSchema without checking the module version it should run and work every time on setup upgrade. So I am not understanding why it is working only first time on fresh module install. I really need to drop this key permanently.
If anyone know or have any other way to drop this foreign key, please help me out here. I already tried google for any solution but didn't find anything. Please suggest what changes or approach should I make to get this done
Thanks in advance.


texts:
trying to add Icon left to the each Category menu, found top.phtml where it displays home icon, have to modify that somehow? code:

<?php
/**
 * $this->renderCategoriesMenuHtml() supports optional arguments:
 * int Level number for list item class to start from
 * string Extra class of outermost list items
 * string If specified wraps children list in div with this class
 */
?>
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<?php if($_menu): ?>

    <?php $_anyActive = false;
          foreach ($this->getStoreCategories() as $_category) {
              $_anyActive = $_anyActive || $this->isCategoryActive($_category);
          }
            ?>
          <li class="level1 nav-0 level-top top parent <?php echo !$_anyActive ? 'active' : '' ?>">
              <a class="active-bghome" href="<?php echo $this->getUrl('')?>"><img src="<?php echo $this->getSkinUrl('images/img-home.png') ?>" alt=""/>

        <?php echo $_menu ?>

<?php endif ?>

output:


texts: Select configurable attributes on an existing product

texts: I have a configurable product setup which has single products as colours, however I now wish to add a new attribute (e.g. size) to the product. I know that when you create a new product and select Configurable Product it lets you choose the attributes to associate, however I can't see an option to add more to an existing product.


texts:
in my site is SIZE display as a custom option, if now I have the products with size of a certain size is not in stock, change the state of this size is not on the active

Possible? let me know

Thanks


texts: error processing request on product page

texts:
I have install the sweet shop magento theme but when i click on product to see details it will showing an error There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 1220027742165

then I go to var/report and find the error record file

    a:5:{i:0;s:85:"Invalid method Mage_Catalog_Block_Product_View::displayProductStockStatus(Array
(
)
)";i:1;s:3156:"#0 /home/royal/public_html/test/app/design/frontend/default/theme646/template/catalog/product/view.phtml(55): Varien_Object->__call('displayProductS...', Array)
#1 /home/royal/public_html/test/app/design/frontend/default/theme646/template/catalog/product/view.phtml(55): Mage_Catalog_Block_Product_View->displayProductStockStatus()
#2 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(241): include('/home/royal/pub...')
#3 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#4 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#6 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#8 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#9 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#10 /home/royal/public_html/test/app/design/frontend/default/theme646/template/page/1column.phtml(52): Mage_Core_Block_Abstract->getChildHtml('content')
#11 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(241): include('/home/royal/pub...')
#12 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home/royal/public_html/test/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#15 /home/royal/public_html/test/app/code/core/Mage/Core/Model/Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#16 /home/royal/public_html/test/app/code/core/Mage/Core/Controller/Varien/Action.php(391): Mage_Core_Model_Layout->getOutput()
#17 /home/royal/public_html/test/app/code/core/Mage/Cms/controllers/IndexController.php(91): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /home/royal/public_html/test/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Cms_IndexController->defaultNoRouteAction()
#19 /home/royal/public_html/test/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('defaultNoRoute')
#20 /home/royal/public_html/test/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 /home/royal/public_html/test/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#22 /home/royal/public_html/test/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#23 /home/royal/public_html/test/royalwholesalecandy/index.php(85): Mage::run('royalwholesalec...', 'website')
#24 {main}";s:3:"url";s:69:"/royalwholesalecandy/jelly-belly-gummi-pet-cockroaches-24ct-5232.html";s:11:"script_name";s:30:"/royalwholesalecandy/index.php";s:4:"skin";s:20:"royalwholesalecandy1";}

so can anyone tell how to remove this error


texts: how to pass variable to phtml file in magento

texts:
form

<input  type="text"  class="input-text required-entry validate-number form-control validate-zero-or-greater" id= "checkout-cart-credit-amount-textboxone"  title="<?php echo $this->__('Gift Card Credit') ?>" name="customer_creditone" />

controller

public function getTextValueAction ()
    {
    $input_amount = $this->getRequest()->getParam('customer_creditone');
    //echo $input_amount.'<br>';

    $this->_redirect('checkout/cart');
    }

controller is working fine me.
 how to call controller variable to phtml file


texts: Product images not changing on swatches click on product listing pages

texts:
I am trying to change configurable product images on clicking swatches for product listing pages. But it is not working. It is working fine for product details page.
Product detail page

It is working fine here. But it is not working for category pages or product listing page.

I tried to look for an answer and found out that I need to update my attribute values that I am using for configurable product. I have updated all the values but it made it work only for product page and not for  category or product listing pages.
The attribute values in admin

Plz guide me how I can make it work for product listing pages too.


texts: User account type in registration form: buyer or seller

texts:
I found an option in System->Permissions->Users. Admin can create roles for them.
But how can I make a choice for a customer on registration form, who he wish to be: a seller or a buyer?

A seller will be able to add products on web site.
A Buyer - only purchase.

I googled some info that I should create attributes buyer/seller and display them in registration form. But attributes and roles are different things in magento as I understand. Should I associate them with each other or there's another solution?

Appreciate any help.


texts: Cretate new table to existing module in Magento2

texts:
I have created the module and installed.

I forgot to include Setup/InstallSchema.php to create the table first time

Once the module is created can we create new table using InstallSchema.php?

I tried that is not created.

After that I used Upgradeschema.php to create the table.

By changing the version in etc/module.xml.

Now i am getting base table not found error.

I am using below code to create table in Setup/UpgradeSchema.php

  use Magento\Framework\Setup\UpgradeSchemaInterface;
  use Magento\Framework\Setup\SchemaSetupInterface;
  use Magento\Framework\Setup\ModuleContextInterface;
  use Magento\Framework\DB\Ddl\Table;

  class UpgradeSchema implements  UpgradeSchemaInterface
 {
  public function upgrade(SchemaSetupInterface $setup,  ModuleContextInterface $context)
{
   $setup->startSetup();

    if (version_compare($context->getVersion(), '2.0.1', '<')) {
      $setup->getConnection()->addColumn(
        $setup->getTable("product_temp_cart"),
        'id',
        [
          "type" => Table::TYPE_INTEGER,
          "identity" => true,
          "nullable" => false,
          "primary" => true
        ]
      );
      $setup->getConnection()->addColumn(
        $setup->getTable("product_temp_cart"),
        'reference_sku',
        [
          "type" => Table::TYPE_TEXT,
          "nullable" => true
        ]
      );
      $setup->getConnection()->addColumn(
        $setup->getTable("product_temp_cart"),
        'product_sku',
        [
          "type" => Table::TYPE_TEXT,
          "nullable" => true
        ]
      );
      $setup->getConnection()->addColumn(
      $setup->getTable("product_temp_cart"),
        'customer_id',
        [
          "type" => Table::TYPE_INTEGER,
          "nullable" => false
        ]
      );
        $setup->getConnection()->addColumn(
        $setup->getTable("product_temp_cart"),
        'quote_id',
        [
          "type" => Table::TYPE_INTEGER,
          "nullable" => true
        ]
      );
       $setup->getConnection()->addColumn(
        $setup->getTable("product_temp_cart"),
        'quote_id',
        [
          "type" => Table::TYPE_TIMESTAMP,
          "nullable" => true
        ]
      );

    }
    $setup->endSetup();
    }
 }

Can we create the table to the existing module. If yes Please anyone share me the code .

Thanks in advance


texts: Adding price-alert link to category list views

texts:
Normally the build in functionality goes just for a single product view as it has no i.e. setProduct() method.
I already modded the module so every product can be set from category list/grid template which works as expected.
As you shouldn't build your blocks hardcoded inside the template I want to move from a

  Mage::getSingleton('core/layout')->createBlock('productalert/product_view')->setTemplate('productalert/product/view.phtml')

to a simple

  $this->getChild('productalert_price')

call and have the rest inside the layout.xml of the pricealert module.
Sadly every handle etc. won't achieve the expected result.

For now I have:

<default>
        <reference name="content">
            <reference name="product_list">
                <block type="productalert/product_view" name="productalert_price" template="productalert/product/view.phtml">
                    <action method="setHtmlClass">
                        <value>alert-price link-price-alert</value>
                    </action>
                    <action method="setSignupLabel" translate="value">
                        <value>Sign up for price alert</value>
                    </action>
                </block>
            </reference>
        </reference>
    </default>


texts: Magento : How do I Get All Orders of Specific Category of Logged in Customer

texts: I want to show customer, orders he has places of a specific category. I wish to display it in customer account section.


texts:
Placed an order with an incorrect VAT number, which then allowed me to submit my order as a Non-Vat customer.

Is there any way to now change that order to a VAT customer and submit a new invoice with the tax amount that there should be?


texts: What could cause error related to "dashboard/tunnel/key"

texts:
There is below information in the log, but no idea what could cause this :(

  a:5:{i:0;s:45:"Unable to read response, or response is empty";
  i:1;s:1003:"#0 lib/Varien/Http/Client.php(61): Zend_Http_Client->request('GET')
  #1 app/code/core/Mage/Adminhtml/controllers/DashboardController.php(100):
  Varien_Http_Client->request('GET')
  #2 app/code/core/Mage/Core/Controller/Varien/Action.php(418):
  Mage_Adminhtml_DashboardController->tunnelAction()
  #3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254):
  Mage_Core_Controller_Varien_Action->dispatch('tunnel')
  #4 app/code/core/Mage/Core/Controller/Varien/Front.php(172):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  #5 app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
  #6 app/Mage.php(684): Mage_Core_Model_App->run(Array)
  #7 index.php(83): Mage::run('my_store', 'store')
  #8 {main}";
  s:3:"url";s:543:"/index.php/admin/dashboard/tunnel/key/ba90f30f2af450c5980c4c6353c49d61/?ga=..&h=..";
  s:11:"script_name";s:10:"/index.php";
  s:4:"skin";s:5:"admin";}


texts: how to concatenate a stirng text with a value of config in table core_config_data

texts:
hello everyone i want to concatenate a string with a value in the table core_config_data i have the path and I don't know how to do it by patches

PS : i am usign magento 2.3

if anyone can help me i will be grateful


texts: Pinterest wants me to Verify my Website so it can be recognized as a business Pinterest page. Where in Magento do I find the html.index file to add the meta tag?


texts: Magento2: Attribute News to date, News from date , special from date and special to date doesn't show in admin

texts:
I've store in  Magento ver. 2.1.4 Enterprise. I am trying to add News to date and special date for products. I can't see it in admin. I've checked and attribute is available but its doesn't show in admin product page.

There is also 1 another problem. I can't set special price for configurable product.

See below screenshot for more detail.

Anyone got this kind of issue?

Update:

I've already run below commands.

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex

Update:

When i use mass update for update product attribute i can see dates. see screenshot below. only problem when add/edit product.


texts: Get product attribute in product view page tab

texts:
I want to show some product custom attribute in product view page at TAB like following image.

So far I've tried following

<?php $_product = $this->getProduct(); ?>

But it return with NULL

Then I tried following

<?php $_product = Mage::registry('current_product'); ?>

But after using above the page goes blank and nothing will appear.

I'm making changes in following path

/public_html/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php

In core file just for testing purpose. Once It will work I'll override it.


texts: Send data from controller to phtml in Magento 1

texts:
Send data from controller to Phtml in Magento 1.

I use ajax send data from phtml to controller and handle it. After processing, I want to send the data back to phtml. And put it on

<option value = "data">

Ex: My data in controller is ABC

I want to put it in like this

<option value = "ABC">


texts:
Can WS-I be disabled for Magento 2 (v2.1.6). It's blocking an API connection to a third party shipping portal (Royal Mail Click and Drop).

Any help would be most appreciated.


texts:
This is my observer:

public function changeStatus(Varien_Event_Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        $getOrder =  Mage::getModel('sales/order')->load($order->getId());
        $OldOrder = Mage::getModel('sales/order')->load($getOrder->getData('relation_parent_id'));
        $OldOrder->setState('mystatushere', true)->save();

    }

I used this event: sales_order_save_before or sales_order_save_after. I know the code is not optimized, so please don't blame me :D . What I want to achieve is to change the parent order status.
I edit an order, make some modification and save it. A new order is created with increment-id-1 and when it this one is save I want to change the status of its parent order.

But I 'm receiving this:
Fatal error: Uncaught Error: Call to a member function getMethodInstance() on boolean in app/code/core/Mage/Payment/Model/Observer.php:46. Any idea why ? thx


texts:
i am trying to figure out the way to put my own Title on pages. I cannot find the field " meta tile"

I have browsed and it seems i have to put the code inside Design/Layout Update XML.
I found following code:

Your Module Page Title

Is " Your Module Page Title " should be the page title?

Hi hope hear from you soon
P.


texts:
I am working with EE1.14 and I am using custom package based on rwd theme.

I want to change "Description" tab title but no luck.

I was using in app/design/frontend/my_package/theme/layout/local.xml

<catalog_product_view>
    <reference name="product.info">
        <action method="setTitle" translate="value"><value>Cru Notes</value></action>
    </reference>
</catalog_product_view>

I searched everywhere before I asked question, and couldn't find an answer.

Thank you


texts: Multiple frequent system log entries from CreareSeo module

texts:
We're seeing frequent (every minute) entries in system.log like this:

2017-05-26T08:48:22+00:00 ERR (3): Notice: Trying to get property of non-object  in /chroot/home/<domain>/html/app/code/community/Creare/CreareSeoCore/Model/Observer.php on line 272
2017-05-26T08:48:22+00:00 ERR (3): Notice: Trying to get property of non-object  in /chroot/home/<domain>/html/app/code/community/Creare/CreareSeoCore/Model/Observer.php on line 279
2017-05-26T08:48:22+00:00 ERR (3): Notice: Trying to get property of non-object  in /chroot/home/<domain>/html/app/code/community/Creare/CreareSeoCore/Model/Observer.php on line 279

The relevant section of observer.php is:

public function getTitle()
{
    $pagetype = $this->metaHelper()->getPageType();
    if ($pagetype && $pagetype->_code != "cms")
    {
        if (!$pagetype->_model->getMetaTitle())
        {
            $this->_data['title'] = $this->setConfigTitle($pagetype->_code);
        } else {
            $this->_data['title'] = $pagetype->_model->getMetaTitle();
        }
    } else if($pagetype->_code == "cms"){       // line 272
        $this->_data['title'] = $pagetype->_model->getTitle();
    }

    if (empty($this->_data['title'])) {

        // check if it's a category or product and default to name.
        if($pagetype->_code == "category" || $pagetype->_code == "product"){    //line 279
            $this->_data['title'] = $pagetype->_model->getName();
        } else {
            $this->_data['title'] = $this->getDefaultTitle();
        }
    }

    return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));
}

Any ideas what's happening?


texts: Magento 2 Custom Customer Attribute type not saving the value

texts:
I have created custom module to create custom customer attribute and its working fine for all type i.e select,file.. but not saving the value like email type.

below is the code to create attribute

       $attributeCode = 'referred_email';

        $customerSetup->addAttribute(
                \Magento\Customer\Model\Customer::ENTITY, $attributeCode, [
            'type' => 'static',
            'label' => 'Referral Email',
            'input' => 'text',
            'source' => '',
            'required' => false,
            'visible' => true,
            'position' => 201,
            'validate_rules' =>'{"input_validation":"email"}',
            'system' => false,
            'backend' => ''
                ]
        );

        // show the attribute in the following forms
        $attribute = $customerSetup
                ->getEavConfig()
                ->getAttribute(
                        \Magento\Customer\Model\Customer::ENTITY, $attributeCode
                )
                ->addData(
                ['used_in_forms' => [
                        'adminhtml_customer',
                        'adminhtml_checkout',
                        'customer_account_create',
                        'customer_account_edit'
                    ]
        ]);

        $attribute->save();

    }

Attribute created successfully but when put email id in input type and save customer ,it not saving and display blank in field while others are working fine.

Please help what am I missing in code.


texts:
I'm trying to install Magento 2. I run this for permission file and folder

chown -R admin:www-data /var/www/magento2
find /var/www/magento2 -type f -print0 | xargs -r0 chmod 640
find /var/www/magento2 -type d -print0 | xargs -r0 chmod 750
chmod -R g+w /var/www/magento2/{pub,var}

I use default Magento2 .htaccess file (permission is 660, i tried other permission like 750) but still got this error

  Forbidden

  You don't have permission to access / on this server. Server unable to
  read htaccess file, denying access to be safe

I tried to add this on .htaccess file but not work

<Directory /mymagento2-folder/>
  AllowOverride None
</Directory>

What should I check or try to see magento2 install page?


texts:
This should be fairly straight forward to do but i can't get the image i've had a look around an peoples methods of getting a sub category is a bit different than mine so can't really apply it anyway the below is what i'm working with i can get the sub category names fine but i need the images or the urls for them.

<?php
 $children = Mage::getModel('catalog/category')->getCategories(6);
 foreach ($children as $category) {
  echo '
';
  echo $category->getName();
  echo $category->getImageUrl();
  echo '
';
 }
?>


texts:
I am trying to learn Magento Admin Modue Development. In this regard I am following this tutorial. Here I got the below line.

 $statuses = Mage::getSingleton('web/status')->getOptionArray();

Now my question is Mage::getSingleton('web/status') referring which class??

Should I have getOptionArray()method in that class??


texts:
Recently I have create one module. but after install its generate following  error

Setup version for module '***' is not specified

Here Composer file

{
    "name": "dd/module-productinquiry",
    "description": "DD productinquiry",
    "require": {
      "php": "~5.5.0|~5.6.0|~7.0.0",
      "magento/framework": "100.0.*",
      "magento/module-ui": "100.0.*",
      "magento/module-config": "100.0.*",
      "magento/module-contact": "100.0.*"
    },
    "type": "magento2-module",
    "version": "100.0.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "extra": {
        "map": [
            [
                "*",
                "DD/Productinquiry"
            ]
        ]
    },
    "autoload": {
        "files": [ "registration.php" ],
        "psr-4": {
            "dd\\productinquiry\\": ""
        }
    }
}

Registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'DD_Productinquiry',
    __DIR__
);

module.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
  <module name="DD_Productinquiry" schema_version="2.0.1" setup_version="2.0.1"/>
</config>


texts: how to install extension without composer

texts: I want to install this extension in my project where i have integrated a new template :evincemage/module-trackorder . I tried  with empty project(without template ) it works but with template it does 'nt appear please help


texts: Filter search not working for custom admin grid

texts:
I have created a custom admin grid. In that search is not working properly. Anyone knows please provide me a solution

ox_homeslider_post_listiong.xml

<filterSearch name="fulltext">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="provider" xsi:type="string">ox_homeslider_post_listing.ox_homeslider_post_listing_data_source</item>
                    <item name="chipsProvider" xsi:type="string">ox_homeslider_post_listing.ox_homeslider_post_listing.listing_top.listing_filters_chips</item>
                    <item name="storageConfig" xsi:type="array">
                        <item name="provider" xsi:type="string">ox_homeslider_post_listing.ox_homeslider_post_listing.listing_top.bookmarks</item>
                        <item name="namespace" xsi:type="string">current.search</item>
                    </item>
                </item>
            </argument>
        </filterSearch>


texts: How can i remove Vat Number field in customer address form admin?

texts: I want to remove Vat Number field in customer address form in admin.Anyone have any idea?


texts: Dedicate Magento ADMIN virtual machine and Percona Cluster

texts:
i want to add to my current infrastructure a dedicated virtual machine only for /admin. In the same time, i'm adding a node to my percona single database, to create a master/master configuration.

My question is: can i configure that this vm with /admin would write on second node so that the load can be splitted?

thanks


texts: Identify if my project css is complied using grunt or glup

texts:
I have installed client magento2 on my local.
I need help to identify if magento2 setup is compiling css using grunt or glup? How can i check this?

Thanks in advance


texts: I have a third party application which want to access magento api using Oauth2. Is there any extension or method which can help me in this?


texts: Unable to save edits to simple products in Magento 2.1.1

texts:
I'm in the testing stages of a new magento store. We migrated products from our current store and everything seemed to be working correctly but when trying to update a simple product, the save button won't work. There are no errors and no action of any kind. The button simply doesn't do anything. Save and New, Save and Duplicate and Save and Close all do nothing.

Even when using the dev tools in chrome, it shows no errors or message of any kind.

We've tried other browsers, clearing caches etc. Everything else seems to be working as it should.

Any help would be greatly appreciated.

Thanks,


texts:
Using the new configurable swatches from Magento CE 1.9.1 I would like to show swatches in product view for the "main" product, but also for a list of products.

I am able to get the swatches in view, but only the swatches on the main product are functional (image changing)


texts: Magento 2.2 - I need little help with install one module

texts:
I try to add this new module in Magento 2.2.2, but after php bin/magento setup:upgrade nothing happens. I try to enable this module in the app/etc/config.php too but is the same. I can't install it.
I do something wrong?
Or what is not okay here?

Thank you

app/code/Vendor/Module/etc/di.xml

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

    <type name="Magento\Catalog\Block\Product\ProductList\Toolbar">
        <plugin name="custom_custom_block_toolbar" type="Vendor\Module\Plugin\Catalog\Block\Toolbar" />
    </type>

    <type name="Magento\Catalog\Model\Config">
        <plugin name="custom_catalog_model_config" type="Vendor\Module\Plugin\Catalog\Model\Config" />
    </type>

</config>

app/code/Vendor/Module/Plugin/Catalog/Model/Config.php

<?php

namespace Vendor\Module\Plugin\Catalog\Model;

class Config
{
    public function afterGetAttributeUsedForSortByArray(
    \Magento\Catalog\Model\Config $catalogConfig,
    $options
    ) {

        $options['low_to_high'] = __('Price - Low To High');
        $options['high_to_low'] = __('Price - High To Low');
        return $options;

    }

}

app/code/Vendor/Module/Plugin/Catalog/Block/Toolbar.php

<?php
namespace Vendor\Module\Plugin\Catalog\Block;

class Toolbar
{

    /**
    * Plugin
    *
    * @param \Magento\Catalog\Block\Product\ProductList\Toolbar $subject
    * @param \Closure $proceed
    * @param \Magento\Framework\Data\Collection $collection
    * @return \Magento\Catalog\Block\Product\ProductList\Toolbar
    */
    public function aroundSetCollection(
    \Magento\Catalog\Block\Product\ProductList\Toolbar $subject,
    \Closure $proceed,
    $collection
    ) {
    $currentOrder = $subject->getCurrentOrder();
    $result = $proceed($collection);

    if ($currentOrder) {
        if ($currentOrder == 'high_to_low') {
            $subject->getCollection()->setOrder('price', 'desc');
        } elseif ($currentOrder == 'low_to_high') {
            $subject->getCollection()->setOrder('price', 'asc');
        }
    }

    return $result;
    }

}


texts: Magento2 - How create custom module js file?

texts: I am new in magento2. I want to create an info link below every product. after clicking a link I want to show some info. I have created PHP file for anchor tag structure like \app\code\Vendor\Module\Block\Catalog\Product\info.php after clicking the link it calling js function from phtml file but I don't understand how to write js file inside js folder;


texts: Magento 1.9. Sales rules with quantity in cart not working

texts:
Magento sales rules with the next configuration (
  Quantity in cart equals or greater than 1
  AND Quantity in cart equals or less than 4)
not working, it's applyng for product even there are 7 products in shopping cart:

it is a clean magento 1.9.2.3. Probłem with compare "1", if I create Quantity in cart equals or greater than 2 AND Quantity in cart equals or less than 4. Than it works fine


texts: How to show out of stock product next due date in Magento 2.2.2?

texts:
How to show out of stock products with next due date for Product availability on market. I am using Magento 2.2.2.

I need free plugins and instructions only because I am not good with coding.


texts: how to apply only 1 coupon code when there are multiples coupon codes

texts: I am running magento 1.9 and i have multiple coupon codes on site. how to make that only 1 coupon code apply on cart? any body know how to apply on 1 coupon on cart?


texts:
I have following code:

<?php
namespace UV\Bestellung\Controller\Adminhtml\Index;

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

class Index extends Action
{

    public function generateBestellschein() {
        $pdf = new Zend("Bestellschein.pdf");

        return $pdf;
    }

    public function execute()
    {
        return generateBestellschein();
    }
}

I am creating a PDF via

  generateBestellschein();

and

  execute();

is executed when custom button is clicked.
I want it to start a download of the PDF.

How do I do that?


texts: Magento 1.x popup confirmation modal in admin panel

texts: I'm wondering if there's any way to set up a popup confirmation message or an alert message under certain settings on my products in back-end panel. Thanks a lot


texts: guys I'm trying to save information in the magento 2 database, but I can't seem to find a tutorial that doesn't have an error. Can someone recommend me a good tutorial that at the end is sure to please?


texts: How does sales_quote and sales_quote_adress table relate?

texts:
In the sales_flat_quote table, there is a store_id column. In my perspective the customer order in the front-end (website) and in the back-end, Magento creates each quote for different stores, if my understanding is correct.

While adding customer address, will Magento create a duplicate copy for each quote in the sales_flat_quote_address table?

How do the sales_flat_quote and sales_flat_quote_address tables work together during checkout?


texts: Magento 2. Frontend. Ui Component. Disable select field after value is selected

texts:
I'm using a M2 custom Ui Component that extends from  Magento_Ui/js/form/element/select so I have total control over the Javascript File.

How do I disable the field after a value is selected?

Can this be achieved without using a custom JS?


texts: How to add an input_renderer for a custom customer attribute?

texts:
I added a custom attribute for customer collection named customer_mode.

It have 2 values first, and second in the following maner:

$data = array(
'customer' => array(
    'customer_mode' => array(
        'label'      => 'Customer Mode',
        'sort_order' => 285,
        'required'   => false,
        'type' => 'int',
        'default' => 1 // First
    )
));

In back office admin area I want to show this field not as int but as an custom input type (select box).

I added the Input renderer:

<?php

/**
 * Class Company_Customer_Block_Adminhtml_Customer_Edit_Form_Renderer_CustomerModeType
 *
 * @author Alexandru Olaru <alxolr@gmail.com>
 */
class Company_Customer_Block_Adminhtml_Customer_Edit_Form_Renderer_Mode extends
    Varien_Data_Form_Element_Select
{
    public function __construct(array $attributes)
    {
        parent::__construct($attributes);

        $this->setValues(
            array(
                array(
                    'label' => Mage::helper('company_customer')->__('First'),
                    'value' => 1,
                ),
                array(
                    'label' => Mage::helper('company_customer')->__('Second'),
                    'value' => 2,
                )
            )
        );
    }
}

Now my problem is what value should I put on the input_renderer ?

$data = array(
    'customer' => array(
        'customer_mode' => array(
            'label'      => 'Customer Mode',
            'sort_order' => 285,
            'required'   => false,
            'type' => 'int',
            'default' => 1,
            'input_renderer' => **????**
        )
    )
);


texts: Send an example newsletter to individual e-mail

texts:
As far as i know, anyone can't manage groups to send the newsletter, but ,could i send a newsletter template to my individual e-mail to check if it's correctly done?

As i see, i could manage the file:

  /app/local/Mage/Newsletter/Model/Queue.php

Method :  getSubscribersCollection() - line 125

code:

$this->_subscribersCollection = Mage::getResourceModel('newsletter/subscriber_collection')
                ->addFieldToFilter('subscriber_email', 'my-test@email.com')
                ->useQueue($this);

it's that correct?

Any other way?

I need to be sure, because i don't want to mail wrong to customers.


texts: Magento 2.1.7 unable to locate gallery.css file

texts:
I need to remove a style that is listed in the below listed gallery.css file.

How ever I believe the path below is the location of a cached version of the file not the actual file??

I need to find the actual file and not sure were/how to find it?

domain.com/pub/static/version1500569382/frontend/Smartwave/porto_child/en_US/mage/gallery/gallery.css

any suggestions on where I can find this file? I looked in

domain.com/app/design/frontend/Smartwave/porto_child

however That directory does not contain a en_US folder?


texts: Do you need to create an integration to drive store process or can it be done via rest API?

texts:
We are working on integrating our ERP system with a Magento store. To this point, we have been developing a REST API connection to the store which is working fine. The goal is to be able to take orders from the Magento store, create them in the ERP system, and then update the store as the order is processed by our normal business processes.

Is it possible to update the order status directly from a back end admin connection via the REST API so that the order state is reflected correctly to the customer, or will we need to write an integration that lives on the server to move the order through the various states?


texts: cannot add custom css in cms page layout - magento 2.1.2

texts:
I can't add my custom css in cms->page->design->layout, my code

<head>
  <css src="Magento_Theme::css/mycss.css" />
</head>
<referenceContainer name="content">
    <container name="home-page-full-block" htmlTag="div" htmlClass="home-page-full-block">
      <block class="Magento\Framework\View\Element\Template" name="homepage_block" template="Magento_Theme::mypage/my_home_page.phtml"></block>
   </container>
</referenceContainer>


texts: Something went wrong with processing the default view and we have restored the filter to its original state

texts:
I got this error when I go to Catalog > Products and select a filter.

I'm on Magento 2.2.6.

Magento says this bug is supposed to be fixed on 2.2.6 but clearly it's not.And unfortunately I do not have enough credibility to comment on this thread and ask what has to be changed to what.

Hoping this question will gain me some credibility hahaha.

Thanks!!!! :) :)


texts: How to remove customer dashboard link Order History for specific users in Magento 2?

texts:
I am using Marketplace extension. If any user is registered as seller in the website then there two order history links are showing in customer dashboard (Seller dashboard or My account section).

One Order History for seller and another for normal customer. Seller can not purchase any items in the website from seller account so I want to remove default Order History links for Seller only.

I want to remove default order history links from seller accounts. Check Screenshot

I am using Magento 2.3.4


texts: Managing magento database through vagrant

texts:
Is there a way to use phpmyadmin if my Magento installation is on vagrant box? Or any recommendations for other tools?

Using command line is horrible if you are working with large tables.


texts: How to make cart Totals (shipping and tax) display labels before address entered in and calculated?

texts:
I am hoping to change some of the functionality and display for the shopping cart totals.  Ideally I would like them to display as follows when the customer first gets to the cart page before they enter their address.

Subtotal: $435.99
Shipping & Handling: ---
Tax: ---
Grand Total: ---

Currently when a customer goes to the cart, this is what they see.

Subtotal: $435.99
Grand Total: $435.99

Which is not ideal, as that is clearly not the actual "grand total" they will be paying.  Also if they use the Estimate Shipping and Tax to get a quote, It will add the Tax to the price, but it will just show and not add the shipping cost unless the customer actually clicks the radio button and clicks "update totals".  If the grand total is not shown until the customer clicks "Update totals" they will know that they have to do that to see the end price.

Any ideas How I can make this happen? Thanks


texts: Magento 2 how to use estimate shipping methods for count shipment

texts:
How I can use  estimate for count shipping method amount.
I wanna to show list of all available shipping method on product page when customer add product to cart its  not adding.


texts:
I am trying to update a site from 1.9.0.1 to 1.9.2.4.

I worked through the steps outlined here and it went fine except that my new site doesn't seem to recognize any my extensions. Previously in the System > Configuration menu there were menus in the left-hand bar for 'Capacity Web Solutions', 'Amasty' and 'aHeadworks' but now I just have the basic options (General, Catalogue, Customers, etc).

What have I missed? How do I get Magento to recognize the extensions?


texts: Magento 2 CE: After adding Custom Customer Attribute Unable to Login

texts:
I'm using Magento 2 Community Edition Version 2.1.0

I'm following How to Override Core Block, Model and controller in Magento2

for overriding Customer Model.

I have added newly attribute called "Passport", it displays in backend/frontend registration page.

For Frontend's Edit Profile, now i'm trying to add "Passport" attribute.

As per above tutorial i have added <module name>/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Customer\Model\Data\Customer" type="Custom\Module\Model\Data\Customer" />
</config>

  {folder path}\magento2\app\code\Custom\Module\Model\Data\Customer.php

namespace Custom\Module\Model\Data;

use \Magento\Framework\Api\AttributeValueFactory;

    class Customer extends \Magento\Customer\Model\Data\Customer
    {

        const PASSPORT = 'passport';

        public function getPassport()
        {
            return $this->_get(self::PASSPORT);
        }

        public function setPassport($passport)
        {
            return $this->setData(self::PASSPORT, $passport);
        }
    }

Once i use this file & try to login with correct credentials. It gives below error.

  An unspecified error occurred. Please contact us for assistance.

If i rename that file say di1.xml, then i'm able to login.

By debug i found that in

  {folder
  path}\magento2\vendor\magento\module-customer\Controller\Account\LoginPost.php

It's not authenticating user


texts: Override locale configuration file to customize price format

texts:
To reliably change the price format(group and decimal symbol) without having to override several classes or write plugins for them, I need to override the en.xml from the Zend library. Changing the XML directly covers several areas at once, like list view, product view or knockoutJS.

  vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml

I tried to override it via theme, but that didn't seem to work. Any ideas?


texts: is it possible to install elastic search in localhost Magento 2.3.4 p2 version

texts:
Hi All, i read documentation from devdocs that how to install
elastic search. For this i have install java jdk package in my
localhost and now i am trying to install elastic search latest version
using cmd but it's taking too much time(it's around 6 hours now).
I wanted to know that is elastic search will work on localhost or not.
because i tried port localhost:9200 in my local machine it's running
please check in below screenshot and even configured it in Magento
2.3.4 p2 version in backend and it's showing Successful! Test again? with same
host localhost:9200 without completion of elastic search setup.
If any idea on it please suggest me.