texts:
I'd like to "clone" the image gallery from product A to a product B.
And with "clone" I mean with all mediaattributes and basically all what is related to the images in the gallery (position, image url, "is thumbnail", "is baseimage", etc.).

Now I now that the product gallery is stored EAV. I've already found the "media_gallery" attribute within the eav_attributes table. Also catalog_product_entity_media_gallery and catalog_product_entity_media_gallery_value seem to be involved.

Neither the Product Media Api nor the Mage_Catalog_Model_Product_Attribute_Backend_Media offer methods to get my task done.
Has anyone got a brainwave?


texts: Default graphql queries are not listing in ChromeiQL

texts:
Hello I am exploring Graphql currently and testing the magento's default graphql APIs but in ChromeiQL there is only two mutation queries are listing(createEmptyCart, placeholderMutation) and it is not allowing to run any other query like generateCustomerToken etc.

So please let me know how can I import these queries to ChromeiQL so that I can use them. Right now it is giving errors likes:

{
  "errors": [
    {
      "message": "Cannot query field \"generateCustomerToken\" on type \"Mutation\".",
      "category": "graphql",
      "locations": [
        {
          "line": 2,
          "column": 7
        }
      ]
    }
  ]
}

Thanks


texts: Magento 2.3.3. error when trying to set Asynchronous sending to Disabled

texts:
I'm trying to set Asynchronous sending as Disabled in Magento 2.3.3 admin, but when saving I'm receiving this error that is shown in the admin page and setting is not saved:

No such entity with cartId = 0

Any ideas what could cause that?


texts: Magento 2 - Export/Import Product Attributes

texts:
I'm trying to export my Product Attributes from one store to a new clean store database. I created a mysqldump for the following tables:

catalog_eav_attribute
eav_attribute_group
eav_attribute_label
eav_attribute_option
eav_attribute_option_swatch
eav_attribute_option_value
eav_attribute_set
eav_entity
eav_entity_attribute
eav_entity_datetime
eav_entity_decimal
eav_entity_int
eav_entity_store
eav_entity_text
eav_entity_type
eav_entity_varchar
eav_form_element
eav_form_fieldset
eav_form_fieldset_label
eav_form_type
eav_form_type_entity

The attribute is shown in the product attributes overview, but when I'm trying to access the products overview in the admin area I get a message 'Attribute with attributeCode "merk" does not exist.'.

I've imported a view products that uses these attributes and they imported fine, nu error message that the attribute could not be found.

Did I miss a table?


texts:
I just to add many attributes to one "sku" by my csv file. 6500 products and 73000 attributes.
On my csv you can see just 2 sku and attributes. Ofcourse I added before my attributes
"urzadzenie", "rodzaj_urzadzenia","seria","model" in admin.

The problem ist, that magmi just assigned just one attribute from the csv, last one.

"sku","urzadzenie","rodzaj_urzadzenia","seria","model"
/*first sku*/
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J125"
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J315w"
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J515 W"
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J265w"
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J415w"
"LC985BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J220"
"LC985BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J265 W"
"LC985BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J140w"
/* second sku*/
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J6710 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J6910 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J525w"
"LC1240BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J725dw"
"LC1240BK","Drukarki","Drukarki Atramentowe","DCP","DCP-J925dw"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J625 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J825 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J430 W"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J5910 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J6510 DW"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J5910 DWAP1"
"LC1240BK","Drukarki","Drukarki Atramentowe","MFC","MFC-J6720 DW"

Maybe is something like "category_reset", but for attributes???


texts: Get Product collection with attribute value equal to null

texts:
I have product attribute called 'category_3' with value 'kids' or null.i wanted only those products with an attribute 'category_3' value equals to null.my query is as follows:-

$products = Mage::getModel('catalog/category')->load(40)
            ->getProductCollection()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter('status', 1)
            ->addAttributeToFilter('visibility', 4)
            ->setOrder('price', 'ASC');

i had tried following options and i am not getting the products with the category_3 value as null

// ->addAttributeToFilter('category_3',array('NULL' => true))
    //->addAttributeToFilter('category_3',array('eq'=>'NULL'))
    // ->addAttributeToFilter('category_3','')


texts: Magento 1.9.3 is not picking up a new template from a child theme from same package

texts:
Magento (Version 1.9.3) is innately picking up on the parent template file (app/design/frontend/rwd/default/template/catalog/layer/filter.phtml), instead of the child theme's template (app/design/frontend/rwd/jammed/template/catalog/layer/filter.phtml).
-I use package rwd, and inside it I have default (rwd/default) theme and jammed (rwd/jammed) theme(s).
-I have set up everything correctly in System -> Configuration -> Design (Current Package Name field = rwd, default field = jammed), and
-I also added all the files from default theme (default) into my new theme (jammed).
-I have also added app/design/frontend/rwd/jammed/etc/theme.xml file with this content:

<?xml version="1.0"?>
<parent>
    <parent>rwd/default</parent>
</parent>

-After all this, I cleared Magento and Cache storage, and disabled all Caching.
The Magento is still taking the old template file. I know this because of the content of the file, and I can also see it in the template hints - in the path field. What else can be the cause of this?


texts: retrive quote cart after reorder and delete product

texts:
I am trying to delete a cart after the user has made a reorder.
I'll explain:
I have a module that adds a free product with a shopping cart price rule (whether a product is part of a specific category, add a free product).
The problem comes when the customer makes a Reorder: Magento adds to cart the free product 2 times in addition to products to be reordered.

You know tell me the event to use the type: "retrive the quote cart after a reorder is made"?

I have created a custom module and I used these events in observers:

checkout_cart_product_add_after
controller_action_predispatch_sales_order_reorder

Thi is my test code:

public function checkFreeProducts(Varien_Event_Observer $observer)
            {

            $order_id =Mage::app()->getRequest()->getParam('order_id');

                $promoSKU ='';
                $items = Mage::getModel('sales/order_item')
                    ->getCollection()
                    ->addFilter('order_id',array('eq'=>$order_id));
                    foreach($items as $item){
                        //if the item has not had a rule applied to it skip it
                        if($item->getAppliedRuleIds() == '')continue;

                        foreach(explode(",",$item->getAppliedRuleIds()) as $ruleID){
                            $salesRule = Mage::getModel('salesrule/rule')->load($ruleID);
                            $promoSKU = $salesRule->getPromoSku();
                        }

                    }
                if($promoSKU){
                    $order = Mage::getModel('sales/order')->load($order_id);
                    $items = $order->getAllItems();
                    foreach($items as $i):
                        $prd_id =  $i->getProductId();
                        $product = Mage::getModel('catalog/product')->load($prd_id);
                        $productSku = $product->getSku();

                        if($promoSKU==$productSku){ // there is a promo product
                            Mage::getSingleton('core/session')->addError('promo product');                      }
                    endforeach;
                }
                $cart = Mage::getModel('checkout/cart')->getQuote();
                foreach ($cart->getAllItems() as $item) {
                    echo $productName = $item->getProduct()->getName();
                    $productPrice = $item->getProduct()->getPrice();
                }

but I could not see if is applied some cart rules.
Someone can help me?


texts: how to display desktop theme on tablets, ipads?

texts:
I have used the following matched expression for mobile devices..

iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini

Now mobile version is also coming on tablets and ipads.
could anyone suggest how to use this expression which will bring the desktop version in tablets and ipad ?


texts: Cancel save() in custom model if condition is met in _beforeSave()

texts:
I have a custom model and I want to add a validation in the _beforeSave() method so that if it's a new object, and no customer_id has been set, it shouldn't save the record at all. I did the validations on my pages but that doesn't keep other developers from doing something like:

$myModel = Mage::getModel("myModule/myModel");
$myModel->save();

This shouldn't happen because some values must be set before saving. I want something like:

public function _beforeSave()
{
    parent::_beforeSave();
    if($this->getCustomerId() <= 0)
    {
         #cancel save
    }

    return $this;
}

Can I cancel the save() method?


texts:
I am new in magento. i m using magento version 1.9.0.1

I want to call custom phtml in homepage using my custom module. i don't want to change in CMS pages.

How can i do this?


texts: New Installation working but no page formatting

texts:
I have installed version 2.3.5 p1 on my windows server 2016 PC and have the site running so you can log in at admin and also view the site.

In all cases the pages are shown with no template or images.

I know I am also braking the rules as the site is on IIS which i have to use due to exchange sever web requirements.

I hope its a simple fix.


texts: New multidomain store front displays maintenance mode - Magento 1.9.0.1

texts:
I basically want to create a new store front in magento and have a different domain linking to it in magento using the same products.

I am using site1.co.uk etc just as an example.

I have created a new Store (site2) in magento and its own Store Front using the main stores root category.

I created an alias domain in Plesk Panel (site2.co.uk) pointing to the domain of the current magento site (site1.co.uk). I also tried a normal domain with its hosting root set to the same as the site1.co.uk root directory. The alias domain I set up in Plesk 12 has the "Redirect with the HTTP 301 code" setting diabled.

I then added the following to my main magentos .htaccess just above "RewriteEngine on"

SetEnvIf Host www\.**site2**\.co.uk MAGE_RUN_CODE=**site2**
SetEnvIf Host www\.**site2**\.co.uk MAGE_RUN_TYPE=website
SetEnvIf Host ^**site2**\.co.uk MAGE_RUN_CODE=**site2**
SetEnvIf Host ^**site2**\.co.uk MAGE_RUN_TYPE=website

However when I visit the new websites URL it takes me to the maintenance page of the current site (keeping the new URL in the bar not forwarding to the main store) and I am stumpted as to why this is happenening.

Any help is greatly appreciated and if I have missed out any info let me know


texts: Is there a solution for changing the admin user interface for multiple select attributes in checkboxes?

texts:
By default, you must hold the Shift or Command key to select multiple values.

The problem is that if you have previously selected values that are not visible (we have very long lists), you might accidentally delete that selection by making a new selection and forgetting to hold the Shift or Command key.

Is there a solution for the selection to be “click on” “click off” instead?

Thanks in advance for any help!


texts: Remove 91 in customer telephone number from database table

texts:
I am using Magento 1.9.0.1 . I have customer data for my site. Previously I was collecting 12 digit telephone/mobile number while registration i.e. 91xxxxxxxxxx

But because of some reason, from now, I will collect customer numbers only of 10 digits i.e. without 91

So I want to remove 91 from all customer's telephone number from database tables

I do not have any idea where customer telephone numbers are present in Magento database tables


texts:
Problem - Redis flushed on some stage so while sale or heavy traffic then all server CPU goes 100%.

Result - server stop responding and sites down.

Servers [ Amazon]

    - 2 webserver with 32 GB Ram with 16 core processor
    - 1 cache server with Redis and Solr install
    - amezon CDN used for images
    - Nginx Server + phpfpm
    - Sticky session enabled
    - RDS database

Magento Application -

 1 . 30,000 products
 2 . 1000 categories
 3 . 4 websites with mulitdomain
 4 . 5 stores - one site have 2 store views

 heavly customized application alots of rewrite

Site load - 400 concurrent user per minute.


texts: Magento 2: Custom module to show the available downloads

texts:
I am working on a requirement to develop a module which will have a REST api to get the number of remaining downloads for a given Order id 'increment_id' and Item id 'item_id'.

As a first step, I created a basic folder structure under app\code\Custom

-ManageDownloadCounter
  -etc
    -webapi_rest
    -module.xml
  -composer.json
  -registration.php

I do Joomla development and started learning Magento2 module development.  Need some advice on what is the next step?  Are there any examples available in GitHub related to my requirement?


texts: All sales emails got same template. Magento 2

texts:
Problem look like title, when i change order status i always is sended same maile (default order item) when its need to send invoice or shipping mail. Is anyone know where i can check how is template choosen for this action or know how to repair this problem.

Change configuration in admin panel not working. Its only work when i edit template for "order" but still its sended for all status.

Thanks for help.


texts: Magento2 and Backorders: what happens when a quote is cancelled or a credit memo is issued?

texts:
So when using Magento 2 and Backorders are enabled. Stock = 2 and Backorder Min Qty = -5, resulting in a Salable qty = 2 -- 5 = 7. Now when adding items to the cart we see

1 item in cart (stock = 2, backorder min qty = -5)
3 item in cart (stock = 2, backorder min qty = -4)
8 item in cart (stock = 2, backorder min qty = 0)
9 item in cart (stock = 2, backorder min qty = -5) Error? Should not be possible

Now when we

Release/invalidate the quote (or empty cart) => the backorder min qty is not reset to -5
Create an order and issue a credit note => the backorder min qty is not reset to -5

Question: what is the intended process here by Magento? And where does this 'magic' qty of 5 items go to?


texts: MAGENTO 2 - Remove "Your credit card will be charged for"

texts:
Running Magento 2.1.7 - Running two (2) stores. One in Guatemala currency and another with Belize currency - Both have to use a USD Base Currency to process Credit Card and PayPal payments but I don't want the USD total to appear on the checkout page so that we don't confuse the clients.

I'm trying to remove or hide the YOUR CREDIT CARD WILL BE CHARGED FOR... field on the checkout page.

Need some help. Anyone out there with the answer? :)


texts: How to pass very big variable with a redirect in the backend?

texts:
I will create a redirect with a very big custom variable in the Magento 2 backend.

Now I use this method:

$resultRedirect->setPath('custom/url/index',array('_query'=>array('very_big_array'=>$arr);

When I try this, my server says: This URL is too long.

How can I pass a very big variable within my redirect?
Maybe the only way is: set a session? But if yes, how can I do this? Do I need this Session manager?

\Magento\Backend\Model\Session $backendSession

Thanks for your reply.


texts: How to access media path with javascript for reliability?

texts:
I want to be able to access the view url path within javascript so I don't have to worry about linking via pub/var.

How can this be done?


texts:
We are using Memcached to cache. Here is part of our local.xml:

<cache>
      <backend><![CDATA[memcached]]></backend>
      <memcached>
        <servers>
          <server>
            <host><![CDATA[unix:///var/tmp/path_to_cache.sock]]></host>
            <port><![CDATA[0]]></port>
            <persistent><![CDATA[1]]></persistent>
            <weight><![CDATA[2]]></weight>
            <timeout><![CDATA[5]]></timeout>
          </server>
        </servers>
        <compression><![CDATA[0]]></compression>
        <hashed_directory_level><![CDATA[]]></hashed_directory_level>
        <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
        <file_name_prefix><![CDATA[]]></file_name_prefix>
      </memcached>
    </cache>
    <session_save_path><![CDATA[unix:///var/tmp/path_to_sessions.sock?persistent=1&weight=2&timeout=10&retry_interval=10]]></session_save_path>
    <session_cache_limiter><![CDATA[]]></session_cache_limiter>

The problem is the only way I can flush the cache is using SSH and the command:

echo "flush_all" | nc -U /var/tmp/path_to_cache.sock

This is OK but if one of the admins wants to add a category or something they can't access SSH and therefore flush the cache.

Is there a simple way that memcached can be flushed from the backend or by running a script?

This is not a duplicate of any of the other questions as I'm looking for a specific way to clear memcached.


texts: Magento custom options for dynamically priced bundled product (no price manipulation)

texts:
Is there a way to add a custom option that does not manipulate the price, to a dynamically priced bundled product.

For example: If we want to sell a suit which is a bundled product, made up of pants and jacket, and we want the customer to select arbitrary data for the pants (for example, color), but we don't want those selections to affect the price in any way, how would we do this?

What would you suggest as the best way, to add this arbitrary data (read: extra data that doesn't affect price)?


texts: Uncaught TypeError: $(...).AddFotoramaVideoEvents is not a function magento 2.3.6

texts:
I am facing this uncaught type error in swatch-renderer.js on listing page in magento 2.3.6
Till now i have tried 2 solutions but no luck:
1: added following lines catalog_category_view.xml
<referenceContainer name="content">
            <container name="product.info.media" htmlTag="div" htmlClass="product media" after="product.info.main">
                <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image.gallery" template="Custom_Product::product/view/gallery.phtml"/>
                <block class="Magento\ProductVideo\Block\Product\View\Gallery" name="product.info.media.video" after="product.info.media.image" template="product/view/gallery.phtml"/>
            </container>
        </referenceContainer>

2: swatch-renderer.js
if (isInitial) {
    if ($.isFunction($(this.options.mediaGallerySelector).AddFotoramaVideoEvents)) {
        $(this.options.mediaGallerySelector).AddFotoramaVideoEvents();
    }
}

i have been facing this issue for a long time.


texts:
Following is code to get entity_ids but MySql throw error e.enitity_id not found

$this->_select = $this->_getWriteAdapter()->select()
->from(array('main_table' => 'catalog_product_entity'), array('entity_id'))
->join(
    array('w' => $this->getTable('catalog/product_website')),
    'main_table.entity_id=w.product_id',
    array()
)
->where('w.website_id=?', $store->getWebsiteId());
$this->_addFilter($storeId, 'visibility', Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds(), 'in');
$this->_addFilter($storeId, 'status', Mage::getSingleton('catalog/product_status')->getVisibleStatusIds(), 'in');

What exactly wrong with above code?


texts: Magento2: Add JS from Admin CMS page Design "layout update XML"

texts:
I did added JS file from design layout update from Admin CMS page- > Design
layout update XML ,  but it showing jQuery is not defined error, When I view source , these files are being added before the requireJS file.

How to add JS from  Admin->Content->Pages ->Open CMS page -> Design ->"layout update XML" ?

<head>
 <script src="js/pi.googleMapStyles.js" order="100"/>
<script src="http://maps.google.com/maps/api/js?sensor=false" src_type="url" order="101"/>
<script src="js/jquery.gmap.min.js" order="102"/>
<script src="js/pi.global.js" order="103"/><script src="js/pi.init.map.js" order="104"/>
</head>

Thanks


texts: What is the use of Magento Security module (Magento_Security)?

texts: Does any one know what is the use of Magento_Security module introduced in the Magento 2.4?


texts: After update from 1.9.1 to 1.9.2 home page (only) doesn't show the included Static Block in the header

texts:
After update from 1.9.1 to 1.9.2, the sites home page doesn't show the included Static Block content in the header area.

All other pages show the Static Block content, its only the home page that is missing the static block content.

Any suggestions?


texts: Drop Down Menu Missing on Import All Product Page

texts: Hello: I did an upload the other day and just out of nowhere, my drop down menu is missing  on the "run profile" page! I can upload the file, then put that file name under "File Information" but it's just one extra step I don't need. Any ideas on how to get this back? Thanks!


texts: Add custom input text field into layered navigation without creating product custom attribute

texts:
I have successfully extend the _getProductCollection function  at \Magento\Catalog\Block\Product\ListProduct
to my custom module block, the problem is I need to add text input to layered navigation so I can get the requested data in my block and do some custom filtering product collection roughly like this:

    protected function _getProductCollection()
    {
        $productCollection = parent::_getProductCollection();
        if(isset($_GET['custom_input'])){
          if(!empty($_GET['custom_input']){
            $customInput = $_GET['custom_input'];
            $productCollection = $this->myModuleHelper->filterProduct(customInput, productCollection);
          }
        }
        $this->_productCollection = $productCollection;
        $this->_productCollection->getSize();
        return $proCollection;
    }


texts:
Does anyone know where I can find the Magento product label file(s)

I'm looking to edit the text for New and Sales labels


texts:
I have created a custom popup in list page .. I need to open the popup after 4 sec of every product addtocart.

And auto close the popup after 4 sec.

some time the popup suddenly closed within 4 sec....

How to slove this ...

    $.ajax({
     url: BASE_URL + this.options.posturl,
      type: "POST",
      datatype: "json",
     data: {productId: productId},
      success: function (response) {
       $("#custom-popup").hide();
   if (response['content']) {
    $("#custom-popup").html(response['content']);
         setTimeout(function () {
           $("#custom-popup").show();
          setInterval(function () {
          $("#custom-popup").hide();
          }, 4000);
         }, 4000);

 }
            }
});

Thanks.


texts:
Getting following error

  require.js:166 Uncaught Error: Load timeout for modules: domReady!_unnormalized2

Any help on how to fix this?


texts: SalesOrderList is returning "created_at" an hour late

texts: The problem is that when I invoke the field "created_at" is always an hour late and I don't know where can i change it.


texts: How to get the products based on above 3 star rating in magento 2?

texts:
I would like to show the prdoucts based on the above 3 star rating using custom collection method.

public function getProductCollection()
    {

        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*')
        ->joinField('rating_score',
        'review_entity_summary',
        'rating_summary',
        'entity_pk_value=entity_id',
        array('entity_type'=>1, 'store_id'=> $this->storeManager->getStore()->getId(), 'rating_summary'=> 100),
        'right'
        );
         $collection->addAttributeToFilter('status', array('eq' => 1) );

        $collection->setPageSize(10); // fetching only 3 products
        return $collection;
    }


texts: Unable to revert Security Patch SUPEE-10570 v1

texts:
Trying to revert SUPEE-10570v1 to apply SUPEE-10570v2, but I'm unable to revert and receiving this code (I have checked all prior patches and they are the correct versions):

app/Mage.php
...
app/locale/en_US/Mage_Catalog.csv
Unreverted patch detected!   Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
app/locale/en_US/Mage_ImportExport.csv
lib/Zend/Mail/Transport/Sendmail.php


texts: change the default text Add Your Review to write review

texts: As per requirement i need to change the default text "Add your review" to "write review". I want to know which file is containing that default text.


texts: Magento 2 How can I add State and Country attribute for customer in Admin?

texts:
How can I achieve State and Country field functionality in Admin under customer Account Information?

I have referred  this link to create in front-end

  https://magecomp.com/blog/create-country-state-dropdown-in-magento-2-custom-frontend-form/

In customer Registration form got the functionality.

I did a small change in custom attribute I used Magento\Catalog\Model\Product\Attribute\Source\Countryofmanufacture source to list the country. For state I refereed the above link.

In Admin I don't know how to achieve state functionality.

I need to achieve state list if options are available and text field if not.

Can someone help me with this I referred lost of blog and Stack Exchange but can't find a single post that explains the workflow to achieve in admin.


texts: Magento 2.3.3 Newbie - How To Setup Multiple Stores in Multi-Domain?

texts:
I'm sorry if this has been asked/answered in a different way of wording it. My apologies.
I have, what seems to be an EXTREMELY simple problem that - no matter how I search it - seems to come up with different solutions. Again, please excuse my ignorance of the solution.
BACKGROUND:
The only reason I switched to Magento is because of Multi-Domain support. I currently have a site up that houses over 400,000 SKUs and I want to be able to move those over to one backend and serve different descriptions/prices on each domain. I am hosted currently on Cloudways AWS server and have the DNS pointing to the correct IP addresses as verified by 'whatsmydns.com'.
PROBLEM:
When navigating to 'PCS.COM' I get 'PCS.COM' to appear as 'PCS.COM/DEFAULT'
When navigating to 'CRESCOM.COM' I get 'PCS.COM' to appear as 'PCS.COM/DEFAULT'
When navigating to 'RRESCOM.COM' I get 'PCS.COM' to appear as 'PCS.COM/DEFAULT'
Id like each domain to point to the correct domain...
I was given instruction from Cloudways that says the following:
1- change the webroot to /pub
2- Fetch the mage run code and mage run type of your stores.
3- Verify the domains in the store-> configurations -> web. Every store should have its own domain, not using the default value.
4- Add the following rules inside the /pub/index.php before $params = $_SERVER;
The code that was provided says:
switch ($_SERVER['HTTP_HOST']) {

case 'abc.com':
                $mageRunCode = 'abc_base';
                $mageRunType = 'website';
                break;

        case 'xyz.com':
                $mageRunCode = 'xyz_base';
                $mageRunType = 'website';
                break;

        default:
                $mageRunCode = 'base';
                $mageRunType = 'website';
                break;
                        }

TRIED:

Updating the pub/index.php file to the recommended settings.
Setting up all Stores > Config > Web settings to the correct values
Deleting Server & Reinstalling Magento 2.3.3
Researching to the fullest extent I can. No matter where I look there are different ways to redirect traffic to the correct domain.

FRUSTRATED:
I don't know why/what/how to manage these redirections work. It seems like it should be a simple deal to do but I am at a loss - any help would be appreciated.
ADDITIONAL QUESTIONS:"

In regards to $mageRunCode - I don't know what code to put in. The Website, Store, or StoreView?
In regards to $mageRunType - I don't know what code to put in. Store or Store View.....Or Web Site?

FURTHERMORE:
I've seen 'solutions' that mention editing the .htaccess file but from my research this would not be optimal because an update to M2 MAY edit that file to make it useless. True?
THANK YOU:
I just want to 'Thank You' for you time, assistance, and patience with me with this issue. For you developers out there I have nothing but respect. //// I just don't know (YET) how to do this operation.
Thank You..Thank You..Thank You.


texts:
I used below function in admin controller to update multiple store status. Its working fine.
why code  ->setIsMassupdate(true) is used?  What it does?

public function massStatusAction()
{
    //Get store ids from selected checkbox
    $storeIds = $this->getRequest()->getParam('storeIds');

    if (!is_array($storeIds)) {
        Mage::getSingleton('adminhtml/session')->addError($this->__('Please select store(s)'));
    } else {
        try {
            foreach ($storeIds as $storeId) {
                Mage::getSingleton('clarion_storelocator/storelocator')
                ->load($storeId)
                ->setStatus($this->getRequest()->getParam('status'))
                **->setIsMassupdate(true)**
                ->save();
            }
            Mage::getSingleton('adminhtml/session')->addSuccess(
                $this->__('Total of %d record(s) were successfully updated', count($storeIds))
            );
        } catch (Exception $e) {
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
        }
    }
    $this->_redirect('*/*/index');
}


texts:
I have a client that would like the option of manually indexing the tables that are no longer indexable from the admin section.

We have created a cron that runs every 4 hours but the client would also like the ability to do this at will.

Has anyone made an extension to override this and allow the functionality for the rest?


texts:
I'm upgrading my development migration to 2.4.  I was surprised to see that 2FA was enabled.  Can this be turned off?
I have enough issues to deal with and prefer not to go through this learning curve.  I prefer not to be forced to add apps to my phone so that I may get into the admin.  I would prefer the ability to make the decision to add this at production time.


texts: Unable to add elastislide js file in magento 2.3

texts:
I am trying to add elastislide,
for that, I added this code in phtml file

 <ul id="carousel_<?php echo $chunk2->getId(); ?>" class="elastislide-list">
    <?php
     print($_category->getData('brand_block'));?>

I've added modernizr.custom.17475.js and jquery.elastislide.js in /app/design/frontend/vendor_name/theme_name/web/js folder

I am getting these errors in console

  Uncaught ReferenceError: jQuery is not defined
      at jquery.elastislide.js:820 (anonymous) @ jquery.elastislide.js:820 (index):296 Uncaught TypeError:
  jQuery(...).elastislide is not a function


texts: Adding Facebook button to top links Magento

texts:
I just haven't been able to get this after reading many examples. I'm trying to add a facebook login button to the top links. I can get thew block to show up all over the place but not in the top links.

This last atempt makes all the links disappear:

<reference name="top.links">

    <action method="setTemplate">
        <block type="fblogin/fblogin" name="fblogin" template="fblogin/fblogin.phtml">
        <action method="setAttribute"><key>position</key><value>1</value></action>
        </block>
    </action>

fblogin

Any suggestion?


texts: Customers get discount, but didn't set a coupon or cart rule

texts:
my customers get a lot of discount when they were logged in (around 70%). But i never made a coupon code or cart rule.
Anyone know where i can delete that?


texts: Custom layout extending 2columns-left.xml problem

texts:
I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far:

I created the layouts.xml file THEME/Magento_Theme/layouts.xml

And then I created the customlayout.xml file THEME/Magento_Theme/page_layout/customlayout.xml
With the same content as:

  vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml

The problem is that the layout has only 1 column, instead of 2columns-left, why?

Thank you.

This is a repeat of the Custom Layout extending 2 columns left, there was no response and I would like to get this issue solved thanks!


texts: how to share the admin configurations in magento 2.2.x

texts:
I am working with git, so i have added a module inside the project with code controllers,blocks,templates... and i have done also some change on this module's configuration on admin backend, so when i push my branch to git the others do 'git pull' from my branch they have the code which i have added but not the changes of the configuration in admin backend for this module ,

  I have seen the doc here ==> https://devdocs.magento.com/guides/v2.3/config-guide/deployment/pipeline/example/shared-configuration.html

they provide the solution but, they provide a command which is "php bin/magento app:config:dump" that means the all changes will be moves to config.php , but i want just to export the change for the module which i was added for example 'myModule'

Can anyone please help me to do that ? I will be appreciated


texts: Change the category of several products at the same time M2

texts: I want to change the category of several products at once, I select all the products that I want to change category, I click on option "Update attributes" but I can not find a way to update the category of all the products at the same time. Any ideas?


texts: Change global value of product attribute in observer

texts:
I have an observer for cataloginventory_stock_item_save_after. From here I change delivery_time:

$stockItem = $observer->getEvent()->getItem();
$productId = $stockItem->getData('product_id');
$product = Mage::getModel('catalog/product')->load($productId);
$product->setData('delivery_time', $rot)->getResource()
  ->saveAttribute($product, 'delivery_time');

This works fine if I work in the backend. But if I order this product delivery_time is changed for the current store view not global.

How can I change the attribute's global value?


texts:
I have some queries.

1.Mention what is the benefit of applying Connect Patches in Magento?
2.Why all patches are not implemented ?
3.How to check whether it is correctly installed or not ?
4.Is there any issue if magento site dont have patches?


texts: Cross border tax settings for business clients

texts:
The situation is as follows: We have enabled "cross border trade" and it's working fine (we have products with Gross price defined and VAT is being calculated based on customer country. For each country each customer sees the same end price).

The problem is with our B2B customer, which should have VAT calculated, but they should not pay it.

For example:

Retail customer: Gross price 100EUR, VAT for his country is 25%, so VAT is 20EUR.
For B2B customer it should be same, but total for him should be excluding tax (80EUR).

Is there a way to set it up (for example with customer groups + tax classes). We're fighting with this for a while and can't google out any solution. Also I can't believe we're the only ones to have that problem. How do you solve it?


texts:
I think you have to use a FTP client to do this, which i haven't used before. But i'm trying to find a way to remove the add to cart option for logged in or not logged in users and remove the prices aswell.

Is there a simple way to do this ?


texts:
i have tried to develop custom extension for adding new field in register customer field using below link

Register form field

app\etc\modules\Imorse_Mobile.xml

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

app\code\local\Imorse\Mobile\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Imorse_Mobile>
             <version>0.1.0</version>
        </Imorse_Mobile>
    </modules>

    <global>
        <helpers>
            <Imorse_Mobile>
                 <class>Imorse_Mobile_Helper</class>
            </Imorse_Mobile>
        </helpers>

        <resources>
            <Imorse_Mobile_setup>
                <setup>
                    <module>Imorse_Mobile</module>
                    <class>Mage_Customer_Model_Resource_Setup</class>
                </setup>
            </Imorse_Mobile_setup>
        </resources>

    </global>

    <frontend>
        <layout>
            <updates>
                <Imorse_Mobile>
                    <file>Imorse_Mobile.xml</file>
                </Imorse_Mobile>
            </updates>
        </layout>
         <translate>
            <modules>
                <Imorse_Mobile>
                    <files>
                         <default>Imorse_Mobile.csv</default>
                    </files>
                </Imorse_Mobile>
            </modules>
         </translate>
        <routers>
            <!-- <routeName> -->
                <customer>
                    <args>
                        <modules>
                            <Imorse_Mobile before="Mage_Customer_AccountController">Imorse_Mobile</Imorse_Mobile>
                        </modules>

                    </args>
                </customer>
            <!-- </routeName> -->
         </routers>
    </frontend>

</config>

app\code\local\Imorse\Mobile\sql\Imorse_Mobile_setup\install-1.0.0.php

<?php
    $this->addAttribute('customer','mobile_number',array(
         'type'      => 'varchar',
        'label'     => 'Mobile Number',
        'input'     => 'text',
        'position'  => 120,
        'required'  => true,//or true
        'is_system' => 0,
    ));
    $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'mobile_number');

    $attribute->setData('used_in_forms', array(
        'adminhtml_customer',
        'checkout_register',
        'customer_account_create',
        'customer_account_edit',
    ));
    $attribute->setData('is_user_defined', 0);
    $attribute->save();

?>

But it is unable to store mobile number in db

Also try to extend controller
app\code\local\Imorse\Mobile\controllers\AccountController.php

<?php
    require 'Mage/Customer/controllers/AccountController.php';

    class Imorse_Mobile_AccountController extends Mage_Customer_AccountController{

        public function loginPostAction(){
            die("yes");
        }
    }
?>

But it always find the action in core controller,
Please help me to solve this issue.


texts: dynamic key => value pair adminhtml setting for custom module

texts:
I have a custom module with adminhtml setting (system.xml), which allows the the user to assign a unique "code" to a specific shipping method.

It looks something like this:

As you can see, this is pretty basic as the requirement was only for 5 mapping. This was done like this using the system.xml like this:

<charge_1_method translate="label">
    <![CDATA[Charge #1 Method]]>
    <frontend_type>select</frontend_type>
    <source_model>mymodule_adminhtml/system_config_source_dropdown_shippingmethods</source_model>
    <sort_order>14</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
</charge_1_method>
<charge_1_code translate="label">
    <![CDATA[Charge #1 Code]]>
    <frontend_type>text</frontend_type>
    <sort_order>15</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
</charge_1_code>

... etc

Now the requirement has changed, where I have to map around 25 different shipping methods to a unique code. So, I'd like to have this portion of the setting functioning dynamically.

So, user can create as many key ==> value pair matching as they want.

Key has to be the "shipping method" from my custom dropdown select source. Value has to be an input field.

Any idea on how I can achieve this? Are there any examples of this?


texts: Magento 2: URL for key for specified store already exists in categories

texts:
We are having a problem in our Magento 2.1.3 shop when we try to save the categories. We are getting the message URL for a key for specified store already exists.

The shop is a migration from a Magento 1 shop and has several root categories and stores. There are in the different root categories with the same name.

Till now we could not really find connections where it gives the error and sometimes it does not give the error.

Is there anyone with experience with this error that knows why this is happening?


texts: Can't add or edit products on Magento 2.2.5

texts:
Whenever I try to add or edit and save a product on Magento 2.2.5, I get the error "A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later."

I've tried everything listed in this thread: https://github.com/magento/magento2/issues/10071

I've also tried looking for error logs, but I can't find any errors at all relating to this problem, only a 500 response code for the Ajax save request.

I was able to add products fine before I used the Magento Migration Tool, which was a little while ago, but I don't recall making any changes that would affect this, nor do I remember installing any other extensions since using the tool.

I've been Googling this all afternoon and I've found multiple answers on Stack Exchange, none of which help me. I've tried changing the admin password, creating a new admin user and making sure I've got full admin permissions. I've also tried re-indexing, clearing the cache, recompiling and manually deleting the cache files.

My closest guess so far is that the migration tool made some changes in the database that is causing it to error on trying to add a new product, although I'd expect to see an error for this. I also haven't found any other errors, so if it is this it's not a fundamental issue and obviously just not migrating the data isn't an option.

HELP!?


texts: Can I patch my 1.9.2.0 Magento store with a patch for the format 1.9.2.4?

texts:
so my store is currently running now on 1.9.2.0 and I wanted to patch it. Now I'm seeing that the format for the last patch is 1.9.2.4. Now my question is: can I still use the patch for my store?

https://www.magentocommerce.com/download

Full Release - ver 1.9.2.4


texts:
i know that this may be a stupid question, i've done reading MagentoDesignGuide.pdf and knows how to edit block, how the XML layout works, and template files works. Since magento documentation is not much i need a lot of question on the development (i'm new to magento Environment and framework)

what i get is 1 page of magento is made from lots of block, layout and modules. either way i want one of my link in my homepage goes to my custom page (a page which i want to made on my own). is there anyway to do it?


texts: Any idea why Choosing of attribute sets are disabled in magento 2.0 community edition?

texts: Choosing of attribute sets are disabled in magento 2.0 community edition by default while creating configurable product. Any idea why ?


texts: Get countries that have a region selector in checkout

texts:
I need to somehow obtain a list of countries that have a region selector (not input box) in the checkout. I know Canada is one of them. There is a bug in one of the modules I use which needs to be fixed by this.

I have no idea how i would go around to even google this.

Any idea how i would achieve this?


texts: Magento 2 customer-data.js:90:23 [object Object]

texts:
I'm using Magento 2.2 with Porto theme and getting an [object Object] javascript error at customer-data.js line 90 in the console after logging into the store and refreshing the page or switching to another page.

I tested this in Firefox, Chrome, IE 11 and Edge and it's only showing up in Firefox (the browser I mostly use).

It isn't causing any serious problems (not as far as I can see), but I would like to resolve this issue.

Line 90 of the customer-data.js file is: "throw new Error(jqXHR);".

Inside the jqXHR object is a JSON response message:

  {"message":"\"paypal-billing-agreement\" section source is not supported"}

I've seen a couple of suggestions out there, but most of them revolved around cleaning cache and static files.

I tried: clearing firefox cache and cookies, cleaning Magento static files, cache and storage cache, but nothing worked so far...

And i'm not really sure what else to do...any help would be appreciated.

Edit/Solution

The cause of the error was that I had disabled the Paypal module but didn't clear the browser local/storage cache.

Inside this cache was a certain call to the paypal module which couldn't be processed so it returned a JS error like this.

Clearing this cache fixed the issue.


texts: Magento2 configure PHPstorm & xdebug and how to use it

texts:
I was using sublime and VScode for the development. Recently I heard that PHPStorm is the best IDE for the Magento2 development and using xdebug you can easily debug the issues and write  modules.  I tried to setup my system for PHPstorm IDE.  To be honest, I tried for 3-4 weeks to setup PHPStorm and Xdebug to run together in my system but it's not working.  I believe on this platform there are many geeks might have seen this issue and would help me to resolve those issue.
Operating System:  Ubuntu 18.04
PHPStorm:  Latest Version: 2020.3.2
Webserver:  Nginx
PHP:  PHP7.3-fpm
I have already install xdebug in linux and configured in /etc/php/7.3/fpm/php.ini  and /etc/php/7.3/cli/php.ini
If I run phpinfo()  it shows xdebug is already installed.  Also, I have installed xdebug Firefox and Chrome extensions (which I saw in one of the video on youtube) but unfortunately still not working.
I have done required configuration by following some articles but unfortunately, xdebug is not working and not showing anything. I tried to set the break point in my extension and When I start the debug it also loads the website with query string:  http://jacksontest.site/?XDEBUG_SESSION_START=19345 but xdebug is not showing any results. Xdebug keep showing the result shown in below screenshot. Even if I refresh the page, it's not showing anything.
I have installed xdebug helper browser extensions for firefox and chrome as well. I also kept those extensions enabled but still no luck. Could you please help me?

I checked many articles, youtube videos but not able to get it work.  There are many developers like me who has just started using the PHP storm but don't know how to configure and use Xdebug with it.
I would really really appreciate if anyone can help me to set it up.
Thank you.
Articles I followed:
Magento 2 PHPSTORM Xdebug Configuration setup
https://magenest.com/en/debug-magento-2-code-xdebug-phpstorm-1/
https://magenest.com/en/debug-magento-2-xdebug-phpstorm-part-2/
https://medium.com/@mailtoankitgupta/remote-debug-magento-server-using-phpstorm-xdebug-30ba2c79e9b6
https://paulmestereaga.com/remote-debugging-magento-xdebug-phpstorm/


texts: Magento 2 callback dimensionsChanged accordion does not work

texts:
I built an accordion from the Magento 2 documentation.
CODE JS:
$(".init-accordion").accordion({
    "active": [1, 2],
    "collapsible": true,
    "openedState": "active",
    "multipleCollapsible": true,
    dimensionsChanged: function(event, data) {
        var opened = data.opened;

        if (opened) {
            // do something when the content is opened
            return;
        }
        // do something when the content is closed
    }
});

The accordion works but the dimensionsChanged callback does not work.
Magento 2 documentation accordion
Does anyone know why and how can I make it work?
Thanks!


texts: Magento 2: How to display error message in CLI

texts:
I have an indexer, which needs to be configured first - requires API credentials.

When I run in a reindex command in CLI: $ bin/magento indexer:reindex my_reindexer_name and the API credentials are not set, I want to display an error / warning message telling the user to configure his credentials. Currently I'm doing it like this:

if ($wrongCredentials) {
    $errorMessage = 'You need to configure your credentials';

    if (php_sapi_name() === 'cli') {
        throw new \Exception($errorMessage);
    }

    $this->messageManager->addErrorMessage($errorMessage);

    return;
}

The issue with this approach is that when the Magento is installed from CLI (via $ bin/magento setup:install ...), the Magento tries to reindex the data, the Exception is thrown (of course, API credentials are not set yet) - so the installation crashes. But I don't want to break the install, simply displaying the message is fine.

When I replace throw new \Exception(...); by simple echo $errorMessage (which works), Magento Marketplace refuses the extension from technical review (bad echo placement).

When I remove the CLI condition completely, $messageManager won't display the error message in CLI.

So the question is - how correctly display the error message in CLI without breaking the installation? Thanks!


texts: Magento 2 File/Folder permissions/ (group) inside Docker container

texts:
I have a local-persist Docker volume containing Magento 2 on the host, and then mount that volume inside the Docker Container.
The issue is that I have a host user that owns the files, then inside the container the user owning is different.
To show: these are only trimmed files/directories, just showing the same ones in both!
HOST:
myusername@hostname:/var/www/html/magento/2_35$

-rw-rw----  1 myusername www-data   1475 Aug  7 14:35 .gitignore
-rw-rw----  1 myusername www-data  11227 Sep  7 14:25 .htaccess
-rw-rw----  1 myusername www-data 752513 Aug  7 14:24 CHANGELOG.md
drwxrwxr-x  5 myusername www-data   4096 Aug  7 14:24 app/
-rw-rw----  1 myusername www-data    150 Aug  7 14:24 auth.json.sample
drwxrwxr-x  2 myusername www-data   4096 Aug  7 14:24 bin/
drwxrwxr-x  2 myusername www-data   4096 Aug  7 14:34 composer/
-rw-rw----  1 myusername www-data   2594 Aug  7 14:34 composer.json
-rw-rw----  1 myusername www-data 803185 Aug  7 14:34 composer.lock
-rw-rw----  1 myusername www-data    350 Aug 31 11:44 config.txt
drwxrwxr-x  5 myusername www-data   4096 Aug  7 14:34 dev/
drwxrwxr-x  3 myusername www-data   4096 Sep  7 13:47 generated/
-rw-rw----  1 myusername www-data     57 Aug  7 14:24 grunt-config.json.sample
-rw-rw-r--  1 myusername www-data   1418 Aug  7 14:34 index.php

CONTAINER:
myusername@37a4fce4decf:/var/www/html$

-rw-rw----  1         1001 www-data       1475 Aug  7 16:35 .gitignore
-rw-rw----  1         1001 www-data      11227 Sep  7 16:25 .htaccess
-rw-rw----  1         1001 www-data     752513 Aug  7 16:24 CHANGELOG.md
drwxrwxr-x  5         1001 www-data       4096 Aug  7 16:24 app/
-rw-rw----  1         1001 www-data        150 Aug  7 16:24 auth.json.sample
drwxrwxr-x  2         1001 www-data       4096 Aug  7 16:24 bin/
drwxrwxr-x  2         1001 www-data       4096 Aug  7 16:34 composer/
-rw-rw----  1         1001 www-data       2594 Aug  7 16:34 composer.json
-rw-rw----  1         1001 www-data     803185 Aug  7 16:34 composer.lock
-rw-rw----  1         1001 www-data        350 Aug 31 13:44 config.txt
drwxrwxr-x  5         1001 www-data       4096 Aug  7 16:34 dev/
drwxrwxr-x  3         1001 www-data       4096 Sep  7 15:47 generated/
-rw-rw----  1         1001 www-data         57 Aug  7 16:24 grunt-config.json.sample
-rw-rw-r--  1         1001 www-data       1418 Aug  7 16:34 index.php

As is shown above, I have given the listing for both the host and container, also notice that the host username and container username are the SAME name.   I do understand that the container and host would not really share username information, that is why as soon as I enter the container the username permissions shows 1001 and not myusername even though the username is setup inside the container.
Question:

I need to find out the correct permissions for the group,

and / or alternative way to 'attach myusername so that it is not 1001 but myusername' inside the container.  This means I can then target the user privileges....

I do not really want to chown -R myusername:www-data . each time entering container / exiting container.  This would mean extra overhead changing folder owners.
Because the user is currently 1001, I need to attach permissions to allow the group to do the equivalent the user is usually allowed to.
These include getting correct permissions to read, write, execute including only readable elements for 'public', so that I do not just use all 777....
Which files/folders do I make 770, 660 774 etc?

Which elements are to executable and which don't need?


texts:
I am wondering if there is a way to customize the layout for when you are on a https page. As in creating a entire layout file or just layout statements in existing files that will only activate on https pages.

I recently ran into some problems with sharethis where I was including the non-https version that worked until we activated https urls on the site. After this the script was being blocked as it was a non-https url.

The solution that I found for this was to switch to the share this secure url which works for both. However it got me thinking if there was a way to use layouts to fix problems similar to this.

I have found you can simply use "//www.example.com" to automatically pull the current http/https however this doesn't work for different urls like share this.

http://w.sharethis.com/button/buttons.js

https://ws.sharethis.com/button/buttons.js

For example if you wanted to add a block advertising your sever security only when you are in https. Would this need to be done in a php block or could it be done via xml layouts.


texts: i have created a custom css but the same css is not getting generated in pub/static/version in custom theme

texts: I have created a custom css but the same css is not getting generated in pub/static/version in custom theme.


texts:
I'm having issue with my log_customer & log_visitor_online tables, both are empty and aren't saving/updating any records for transactions.

All the other log tables are working well & are updating the data, so Log is not disabled & also core_config_data has a value 1 for dev/log/active


texts: In Magento 2, I want to display a popup (with html code inside) when a user clicks on a link.


texts:
How to get all items purchased by a customer.

Thank you for all the responses. But my issue is that I am trying to show all products in the My Downloadable Products Page. But the following code,

$_items = $this->getItems();

in the default/template/downloadable/products/list.phtml

the $_items are all downloadable products only. How can I get all products there?


texts:
We upgrade Magento to 1.9.2.4. Now it worked for a while. When we cleared the cached. We can't log in to the backend anymore. It keeps saying

"Invalid Form Key. Please refresh the page."

Our staging site is working fine.

I followed some instructions like increase in_var_input, check cookies and others but didn't work out.


texts: Can we eliminate the login step from default checkout and force to use the default login page?

texts:
I wanted to remove the login step from Magento's default checkout and making users to be redirected to the default login page, it doesn't make sense having 2 logins forms.

Is that possible? Important: after logging in, user needs to be redirected to checkout after that instead of account page or whatever page else...


texts: Inserting Newsletter into CMS page. Magento 2

texts:
I have the code below in a CMS block.  The block is being called in my footer but the template is not. Is there something else I need to do?

{{block class="Magento\Newsletter\Block\Subscribe" template="Magento_Newsletter::templates/subscribe.phtml"}}


texts: How to integrate Adobe Stock Integration in the Open Source 2.4-develop branch project?

texts:
Does anyone use the Adobe Stock Image Searchable Interface inside PageBuilder blocks?

Will it sync Magento's Catalog/WYSIWYG images with the Adobe Stock or will it work vice-versa.

Is it good to configure directly on the LIVE website?

Added composer changes to the <magento-root>/composer.json file as follows:

https://github.com/magento/adobe-stock-integration/blob/1.0.0-release/_metapackage/composer.json

After enabling all the required modules, a new button added into the page builder content section as Search Adobe Stock using the below plugin.

Magento\AdobeStockImageAdminUi\Plugin\AddSearchButton.php

Ref. https://github.com/magento/adobe-stock-integration/tree/1.0.0-release


texts: Displaying path instead of product image in my account page

texts:
i am trying to display product images in My account page. but its displaying as below , means instead of image, its displaying below path :

http://sitename.com/media/catalog/product/

I tried

echo Mage::getModel('catalog/product_media_config')->getMediaUrl( $product->getImage() );

related code :

<?php foreach ($collections as $key => $product) {

echo $product->getName().' <br>';
echo Mage::getModel('catalog/product_media_config')->getMediaUrl($product>getImage() );
?>

complete code :http://pastebin.com/rfGTE38h

we are saving product details in one more custom table , is the image is trying to fetch from there ?

Edit

when i tried below code , i am getting full path of image, but i want to display image :

sitename.com/media/catalog/product/1/8/183615421.png

echo Mage::getModel('catalog/product_media_config') ->getMediaUrl( $product->getThumbnail() );


texts: only alphabet in firstname and lastname in customer registration form Magento 2

texts: How can i add validations for only alphabets in First name and Last name fields in Customer registration form?


texts: magento 1.9 override core block template

texts:
I edited these files but I cannot override the default.phtml file, it doesn't work, what's wrong with that?

Config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Vendor_Mymodule>
            <version>0.1.0</version>
        </Vendor_Mymodule>
    </modules>
    <frontend>
        <layout>
            <updates>
                <myfile>
                    <file>myfile.xml</file>
                </myfile>
            </updates>
        </layout>
    </frontend>
</config>

myfile.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <catalog_product_view>
        <reference name="product.info.simple">
           <action method="setTemplate">
               <template>mymodule/catalog/product/view/default.phtml</template>
            </action>
        </reference>
    </catalog_product_view>
</layout>


texts: Mage_Catalog_Model_Product::getImageUrl() deprecated since 1.1.5

texts:
I found some interesting methods in the product model

/**
 * Return re-sized image URL
 *
 * @deprecated since 1.1.5
 * @return string
 */
public function getImageUrl()
{
    return (string)$this->_getImageHelper()->init($this, 'image')->resize(265);
}

/**
 * Return re-sized small image URL
 *
 * @deprecated since 1.1.5
 * @param int $width
 * @param int $height
 * @return string
 */
public function getSmallImageUrl($width = 88, $height = 77)
{
    return (string)$this->_getImageHelper()->init($this, 'small_image')->resize($width, $height);
}

There's also getThumbnailUrl() which work in the same way as getSmallImageUrl()

Unfortunately, the @deprecated doc comment does not say anything about a replacement, so I wonder what should be used instead.

The method is not used in the core and in Magento 1.9 the templates always instantiate the image helper directly.

However, I wonder why I should not use this shortcut and why it has been deprecated in the first place. I'm sure it won't be removed now, if it hasn't been since 1.1.5. getImageUrl() might not be very useful because it resizes to a fixed value, but getSmallImageUrl() and getThumbnailUrl() take $width and $height parameters.


texts: setting up ecomdev install error 'host is not set for base url'

texts:
I am trying to install ecomdevs' unit testing with my copy of magento. I have added the folders manually to the relevant directories and added the below in app/etc/local.xml.phpunit

<default>
    <web>
        ...
        <secure>
            <base_url>http://siteName.local</base_url><!--also tried localhost and siteName.local-->
        <secure>
        <unsecure>
            <base_url>http://siteName.local</base_url><!--also tried localhost and siteName.local-->
        <unsecure>
        ...
    </web>
</default>

When I go to the command line in the root folder of my site and enter phpunit I get a fatal error returned

  Uncaught exception 'RuntimeException' with message 'Cannot run controller test, because the host is not set for base url

I know I'm missing something obvious but ive been looking at this problem for far to long, why am I getting this error? (I'm following this guide)


texts: show attirbute value as checkbox and get qty for each checkbox value

texts:
I am working on a magento project in which i want to set a product attribute value which will be displayed to customer as checkbox and also i want to get quantities for each checkbox value. if a customer selects two or more checkbox value and give quantities to those values i want to add them to cart and order. In cart and order it should display as 3 products(i mean same product but with different attribute value and qty).

I am a beginner for magento so please suggest me if there is there any magento extension available. Also i would like to get some help or idea on achieving this. Any help will be much appreciated.

If anyone need more information i will add it.


texts: Magento 2:Uncaught TypeError: $(...).slick is not a function Slick slider

texts:
File: gallery.phtml

Path:

  app/design/frontend/SimpleMagento/CustomTheme/Magento_Catalog/view/frontend/templates/product/view/gallery.phtml

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<?php   $someJSON = $block->getGalleryImagesJson();
 $someArray = json_decode($someJSON, true);
?>

            <?php foreach ($someArray as $value => $key){ ?>

                    <img src="<?= /* @noEscape */ $key['full'] ?>" alt="" />

            <?php }?>

            <?php foreach ($someArray as $value => $key){ ?>

                    <img src="<?= /* @noEscape */ $key['thumb'] ?>" alt="One">

            <?php }?>

File: requirejs-config

Path

  app/design/frontend/SimpleMagento/CustomTheme/requirejs-config.js

var config = {
   paths: {
    slickSlider: 'js/slick.min'
   },
   shim: {
     slickSlider: {
        deps: ['jquery']
      }
   }
};

I added slick.min.js in

  app/design/frontend/SimpleMagento/CustomTheme/web/js/slick.js

but error is still there, everytime I reload the page its showing new error

Here is the few screenshot of error, I think its conflicting with core js.


texts: Length, width and weight price calculations for silver chains

texts:
I need to add a function to a silver chain website

Require the customer to be able to choose LENGTH - WIDTH - of chain

The base price for 16 inch 1mm chain = $10
I need the price to auto calculate when the customer selects a different option from the drop downs.

Every time the length or weight increases the price will increase too.

When the customer has selected length and width the weight in grams of the chain will show.

For example

  Length
  16 inch
  18 inch
  20 inch

And

  Width
  1mm
  2mm
  3mm
  4mm
  5mm


texts: Add automatically a product to wishlist after order is done

texts:
I’m supposed to move to the wishlist, all the items that i've got in the cart but straight after the order is complete.
Any ideas?

Thanks!

Here is my code:

in /app/etc/modules/Eleva_ObserverFromCartToWishlist.xml

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

in /app/code/local/Eleva/ObserverFromCartToWishlist/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Eleva_ObserverFromCartToWishlist>
            <version>0.1.0</version>
        </Eleva_ObserverFromCartToWishlist>
    </modules>
    <global>
        <models>
            <eleva_observerfromcarttowishlist>
                <class>Eleva_ObserverFromCartToWishlist_Model</class>
            </eleva_observerfromcarttowishlist>
        </models>
        <events>
            <sales_order_place_after>
                <observers>
                    <Eleva_ObserverFromCartToWishlist_Model_Observer>
                        <type>singleton</type>
                        <class>Eleva_ObserverFromCartToWishlist_Model_Observer</class>
                        <method>addfromcarttoWishlistEvent</method>
                    </Eleva_ObserverFromCartToWishlist_Model_Observer>
                </observers>
            </sales_order_place_after>
        </events>
    </global>
</config>

in /app/code/local/Eleva/ObserverFromCartToWishlist/Model/observer.php

<?php

class Eleva_ObserverFromCartToWishlist_Model_Observer {

    public function addfromcarttoWishlistEvent(Varien_Event_Observer $observer) {
        $order = $observer->getOrder();
        $items = $order->getAllVisibleItems();

        //assuming the customer check out as a register user
        $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($order->getCustomerId(), true);

        foreach($items as $item){
           $product = Mage::getModel('catalog/product')->load($item->getProductId());
           //Todo - add the options
           $buyRequest = new Varien_Object(array()); // any possible options that are configurable and you want to save with the product
           $result = $wishlist->addNewItem($product, $buyRequest);
        }

        $wishlist->save();

        $myfile = fopen("newfile.txt", "a") or die("Unable to open file!");
        fwrite($myfile, "test");
        fclose($myfile);

        Mage::log($order);
    }
}


texts: How to get customer phone from order shipping data?

texts: How to get customer telephone number mentioned in order shipping address?


texts: merge guest quote with customer quote(if custommer log in) magento 2 rest api

texts:
if 2 items in cart if customer login both item should need to add cart , Both quote (before login & after login) merge and create final quote which contain all item of customer quote

Refference links that i got in google

https://magento.stackexchange.com/a/62481

https://magento.stackexchange.com/a/30460


texts: How to upgrade Magento 2.3.1 to Magento 2.3.2 ?


texts: Magento 1.9.x Product attribute value in both _varchar and _text tables

texts:
Wow this is a strange one.

I have two product attributes which , in the admin, seems to load from the catalog_product_entity_text table

# value_id, entity_type_id, attribute_id, store_id, entity_id, value
'86950', '4', '329', '0', '2887', 'HRC: 20,3–68; HRB: 41–100; HRA: 61-85,6; HV: 80–1599; HB: 76–618; Tensile strength: 255–2180 N/mm2'

but save to the catalog_product_entity_varchar table.

# value_id, entity_type_id, attribute_id, store_id, entity_id, value
'116583', '4', '329', '0', '2887', 'HRC: 20,3–68; HRB: 41–100; HRA: 61-85,6; HV: 80–1599; HB: 76–618; Tensile strength: 255–2180 N/mm2 test2'

How? Why? What?!  In the attribute admin the frontend_input field is set to "text" / Text Field.  If I change the store_id in the varchar table to 1 (the only store) then, for a moment the value in that table will load into the admin. Saving will reset it to store 0 and then the value in the text table will load from then on again.

Any idea why this might have happened and how to get out of it?

Thanks

UPDATE
The values for backend_type   and frontend_input  inside  the eav_attribute table are different!  But then so are many others

UPDATE 2
OK have made things work.  BY changing the backend_type from varchar to text things seem to be working correctly.


texts:
I'm trying to create a new theme by following

'http://devdocs.magento.com/…/front…/themes/theme-create.html' or

'Theming for Magento 2 - Starting from scratch'

this tutorial but once everything was done then I'm getting this annoying error:

P.S: I have cleared all cache, reindex, deploy-static, maintenance:disable and things like that. At the moment I've installed Magento on a bitnami instance.

Does anyone have such an issue with his/her experience?


texts: Multiple stores, dynamic domains problem

texts:
In a new site, with multiple domains, I have a problem. First the several websites with their own store view:

shop.mydomain.org, code shop
retail.mydomain.org, code retail
*.mydomain.org, code base

The base_url for all these stores is set to {{base_url}} since the last one is dynamic. In a .htaccess file, the code is set, ie:

RewriteCond %{HTTP_HOST} ^shop.mydomain.*$
RewriteRule ^ - [E=MAGE_RUN_TYPE:website,E=MAGE_RUN_CODE:shop] [L]

When visiting ie shop.mydomain.org the first time after clearing the cache, everything works fine. The base_url is set to shop.mydomain.org. Without clearing the cache and continueing on shop.mydomain.org, the base_url is still okay.

Still without clearing the cache, when I visit retail.mydomain.org, there is a problem with the base_url. On this domain, the base_url is the same as for shop.mydomain.org, when I would expect it to change to retail.mydomain.org.

I know I can change the base_url in the configuration to shop.mydomain.org and retail.mydomain.org solving my problem for these 2 domains. But, the last domain (*.mydomain.org), can't be set to a specific base_url. All must work with a template in which an image is loaded based on the * part in the domain.

What I've tried:

In Mage_Core_Model_Store->getBaseUrl(), change line

$this->_baseUrlCache[$cacheKey] = rtrim($url, '/') . '/';

to

return rtrim($url, '/') . '/';

to prevent Magento from adding the url in cache.

And more or less the same in Mage_Core_Model_Website::getConfig(); don't store the config value in cache if the path contains 'url'.

Both options didn't work. Does someone have a solution?


texts: M2 - Error : PHP Fatal error: Uncaught Return Duplicate key-sequence ['view_preprocessed'] error run any commands

texts:
Screenshot :

Error :

PHP Fatal error:  Uncaught
Magento\Framework\Exception\LocalizedException: Invalid Document
\nElement 'item': Duplicate key-sequence ['view_preprocessed'] in key
identity-constraint 'argumentItemName'.\nLine: 725\n in
C:\xampp\htdocs\mage\vendor\magento\framework\Config\Reader\Filesystem.php:168\nStack
trace:\n#0
C:\xampp\htdocs\mage\vendor\magento\framework\Config\Reader\Filesystem.php(132):
Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))\n#1
C:\xampp\htdocs\mage\vendor\magento\framework\App\ObjectManagerFactory.php(279):
Magento\Framework\Config\Reader\Filesystem->read('primary')\n#2
C:\xampp\htdocs\mage\vendor\magento\framework\App\ObjectManagerFactory.php(140):
Magento\Framework\App\ObjectManagerFactory->_loadPrimaryConfig(Object(Magento\Framework\App\Filesystem\DirectoryList),
Object(Magento\Framework\Filesystem\DriverPool),
Object(Magento\Framework\ObjectManager\Config\Mapper\Dom),
'developer')\n#3
C:\xampp\htdocs\mage\vendor\magento\framework\App\Bootstrap.php(211):
Magento\ in
C:\xampp\htdocs\mage\vendor\magento\framework\App\ObjectManagerFactory.php
on line 281

How to solve the error while running s:d:c


texts: store order id and timestamp on successful checkout in custom table

texts:
As the question is self explanatory but for more details I need to store the order id and timestamp of the order creation in a separate table.

What my boss asked me to do is to user overriding (for reference shown here). But I'm unable to figure it out whether I need to override a block or controller, and which one?
One of my peer suggested me to override the Checkout/OnepageController's successAction(). But neither the overriding of controller worked nor I'm able to get the timestamp there.

I'd gone through this blog of magento commerce but the OnepageController not getting overridden.

P.S: Before down vote please let me know what is wrong with that?


texts: I'm creatings feeds on several Magento-stores and I would like to add the logo in the feed. But each store uses different themes and therefor  different logo-locations. Is there a command which shows the logo-location independed of the used theme?


texts:
I can not install magento 2.2.1 at my server-ip (not point to dns yet). I am running centos 7 with cwp (centos web panel), apache 2.4.9, php 7.0.24, mariadb 10.1.29. I already have tried at test environment with virtualbox, it worked perfect, even with nginx.

Now At this time at webserver, I have tried different methods without luck, like:

1.- fix permission to magento installation directory /home/username/public_html/

2.- with and without nginx

3.- installed by command line

4.- also I have read different topics, all those are about after install, I am stuck at installation procedure, It is suppose to see web installation wizard at http://server-ip/ (or http://server-ip/setup ) , however It does not show up, I just can see http test page.

5.- Also I have checked mod_rewrite and .htaccess and ServerName.

As far as I can see, In virtualbox server ip and shared ip are different and I used Nat-ed option. At server production server ip and shared ip are the same and I have not used Nat-ed.

Any advice?


texts:
After creating the Virtual product order invoice order status is changing in to complete but I  want to set virtual order status to processing I am using Magento 2.2.2 version.

Please let me know the solution.


texts: Getting Category Path in URL for EE 1.13

texts:
In Magento Enterprise Edition 1.11 we have the URLs did the following

Category Lv 1 - http://me.dev.local/men-s
Category Lv 2 - http://me.dev.local/men-s/clothing
Category Lv 3 - http://me.dev.local/men-s/clothing/activewear
Product       - http://me.dev.local/men-s/clothing/activewear/shirt-001

since upgrading to 1.13, the URLs no longer do this, instead it's only really the last element that is in the url (ie. men-s, activewear, shirt-001)

now i found an option in System > Configuration > Catalog > Catalog > Search Engine Optimizations called "Use Categories Path for Product URLs", setting this to Yes allowed the products to work like they did before in 1.11

with some of the categories we have, using the same example as above we have a Men's and Women's Level 1 Categories, both would have Clothing, both would have Activewear, because of the upgrade to 1.13, one fo the 2 categories is now has a -# at the end (in most cases it's -1 but we also have kids categories so some get a -2 or -3)

i am wondering if there is a setting to get Categories to have the URL Path like what i have listed above to appear like that in 1.13


texts: Magento 2 how to override Apply Coupon form submit override

texts:
I want to override the post method of apply coupons in the checkout payment tab. I want to redirect when a coupon is applied not an ajax call.

I have tried using coupon code event and using js  no luck


texts: How to create an attribute in Magento 1.9?

texts:
I am new to Magento and I am creating a product attribute but the problem I have is that I have 3 Attribute Sets (default, Imported, Local), but when I create the attribute, this attribute is created in the 3 Attribute Sets, even if I do not have the created group, the attribute creates it automatically.

$this->startSetup();
$this->addAttribute('catalog_product', 'cod_import', array(
    'label'             => 'Código de Importación',
    'attribute_set'     => 'Importados',
    'group'             => 'Especificaciones de importacion',
    'type'              => 'decimal',
    'visible'           => true,
    'required'          => true,
    "nullable"          => true,
    'sort_order'        => 2
));
$this->endSetup();


texts: magento 2 getting error on update product action in admin panel

texts:
I am getting the below error in the magento admin panel while editing the product options from the action dropdown.
Catalog - products. Select a product or 2. Then actions menu select change attribute

  Exception #0 (Exception): Warning: A non-numeric value encountered in /var/www/domain/vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml on line 135

Please help me to solve this issue.


texts: How to get only parent products of a particular manufacturer using Product collection Model

texts:
I am trying to get only parent product of a particular manufacurer using product collection Model. I tried below code-

$brand_id=23;  // a manufacturer option value
$manufacturerId = $brand_id;
$attributeCode = 'manufacturer';
$_productCollection= Mage::getModel('catalog/product')
                    ->getCollection()
                    ->addAttributeToFilter($attributeCode, $manufacturerId)
                    ->addAttributeToSelect('name');

below is the screenshot showing what I am trying to do-

in above image I am getting all parent + child products. I only want to get parent products.
I have used tried this link but no luck, can anyone guide me how can I do that.


texts: How to get order collection which don't have invoice Magento 2?

texts:
I want to get order collection which don't have invoice. I want to create invoice manually for specific product type.
How can I get?
My working code in which I have get recent 10 days orders:
<?php
ini_set("memory_limit", "-1");
ini_set('max_execution_time', 18000);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
use Magento\Framework\App\Bootstrap;
$droot = '/var/www/html/';
include $droot.'app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_WEB);

$_connection = $resource->getConnection();
$scopeConfig = $objectManager->create('\Magento\Framework\App\Config\ScopeConfigInterface');

$orderCollection = $objectManager->get('Magento\Sales\Model\ResourceModel\Order\CollectionFactory');
$prev_date = date('Y-m-d', strtotime('-10 days'));
$current_date = date('Y-m-d');

$collection = $orderCollection->create()
   ->addAttributeToSelect("*")
   ->addAttributeToFilter('created_at', ['gteq'=>$prev_date.' 00:00:00'])
   ->addAttributeToFilter('created_at', ['lteq'=>$current_date.' 23:59:59']);

foreach ($collection as $col) {
    $orderId = $col->getId();
    $order = $objectManager->create('Magento\Sales\Model\Order')->load($orderId);

    $productType = '';
    foreach ($order->getAllVisibleItems() as $_item) {
        $productType = $_item->getProductType();
     }

    if($productType == 'amgiftcard'){
        if ($order->canInvoice()) {
            $invoice = $objectManager->create('Magento\Sales\Model\Service\InvoiceService')->prepareInvoice($order);
            if (!$invoice->getTotalQty()) {
                throw new \Magento\Framework\Exception\LocalizedException(
                            __('You can\'t create an invoice without products.')
                        );
            }

            $invoice->setRequestedCaptureCase(\Magento\Sales\Model\Order\Invoice::CAPTURE_OFFLINE);

            $invoice->register();
            $invoice->getOrder()->setIsInProcess(true);
            $transaction = $objectManager->create('Magento\Framework\DB\Transaction')
                            ->addObject($invoice)
                            ->addObject($invoice->getOrder());

            $transaction->save();
            $objectManager->create('Magento\Sales\Model\Order\Email\Sender\InvoiceSender')->send($invoice); // Send Invoice email

            $order->addStatusHistoryComment(__('Invoice generated #%1.', $invoice->getId()))->setIsCustomerNotified(true)->save();
        }
    }

}

?>


texts: Cannot save payment methods in Magento 2.26. When I click on "save" nothing happens. Any idea?


texts: Customers being redirected to login page when logged in and loading the checkout page

texts:
I am using Magento 2.2.2 and have an odd problem. Below is an itemised route to the error.

Existing customer logs in
Customer adds a product to the basket
Customer clicks the go to checkout button
Checkout page loads
Checkout page redirects customer to login page

Prior to the redirect, an ajax request (usually the shipping estimation) returns a 401 error message.

This only affects customers who have been to the site before. Another curiosity is that when incognito mode is used. The error does not occur.

There are no exceptions reported, or anything obvious in the system.log


texts: Magento2 Disable time from user displaying & set default time

texts:
I need to set the default time for form & to. Form - 00:00:00 & To - 23:59:59
Following is the code
$fieldset->addField('from', 'date', [
            'name'        => 'from',
            'label'       => __('From Date'),
            'title'       => __('From Date'),
            'date_format' => \Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
            'time_format' => '00:00:00',
            'value'       => $this->_dateTime->date('m/d/Y')
        ]);

        $fieldset->addField('to', 'date', [
            'name'        => 'to',
            'label'       => __('To Date'),
            'title'       => __('To Date'),
            'date_format' => \Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT,
            'time_format' => '23:59:59',
            'value'       => $this->_dateTime->date('m/d/Y')
        ]);

I don't want user to select time.
My issue is here time is time is getting displayed which I need to hide. Please advice


texts: learning approach for a Magento beginner

texts:
I am new to magento. Before the question, my background:

I have some previous experience in php. I have developed a small e-commerce site for food ordering as part of my course project. (but I have used procedural method for the same)
I know the fundamentals of OOPS concepts. I have programming experience in c++ and java.
I know html5, css3 and js and have done some projects in them too.
I installed magento CE 2.1 in ubuntu 15.10 LAMP. I am using the Magento_Community_Edition_2.0_User_Guide to learn the basics.

I want to learn magento from 2 perspectives:

a. website owner

b. developer

i.e. I need to be able to setup an online store, run it and make customization in the front end and in functionality.

My questions:

A. Is an in-depth understanding of php OOPS and development experience required for this? Do you suggest learning this before looking at learning
magento from a developer's perspective?

B. To learn magento from a store owner's perspective what leaning resources are available and what approach is suitable?

C. To learn magento from a developer's perspective what leaning resources are available and what approach is suitable?

D. Do I have to study about the previous versions of magento(1.x)?

If I have missed any core subjects please edit this question or include them in your answer.


texts:
I have magento CE 2.2.2
I have a problem when i try to enable production mode.

Store give me this error:

Unable to retrieve deployment version of static files from the file system.

If i run:

php bin/magento setup:static-content:deploy -f

I have the sample problem.
But if i try to add it_IT , my default language .

php bin/magento setup:static-content:deploy -f it_IT

Works! But when i run:

php bin/magento setup:upgrade

The problem returns to the origin :
 Unable to retrieve deployment version of static files from the file system.


texts: Conflict after disable module sparsh/magento-2-product-label-extension

texts:
We have install module via composer:
composer require sparsh/magento-2-product-label-extension
This module is completely bugged and many functions in website have conflict.
Now I disable module - but still I have conflicts.
Step 2:
I remove via composer and upgrade etc.
composer remove sparsh/magento-2-product-label-extension
I not see now this module in vendor. But still I get the same issues (conflict):
1 exception(s):
Exception #0 (ReflectionException): Class Sparsh\ProductLabel\Model\Config\Source\LabelOptions does not exist

Exception #0 (ReflectionException): Class Sparsh\ProductLabel\Model\Config\Source\LabelOptions does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() called at [vendor/magento/framework/ObjectMan

Impossible open product page, categories products etc.


texts: Magento 2.1 Points System for selling products

texts:
In my project, the products values are set by Points instead of real currencies and the store customers would have kind of a "points wallet", that they would be able to trade for products.They would be purchasing products with points instead of real currency.

Does Magento have some kind of built-in feature or extensions (free or paid) that allows the configuration of such functionality?

Note: - This is not like reward point system such as earning some points by buying some products.

My Requirement:

I will brief you about my exact scenario. I have two different stores on one website. Both have different domains. Like shopping.com and members.com Ok. Users who are already a member can only login in members.com site. shopping.com is open to all type of users. Users can switch between these stores.

Now my issue comes here: When a member user buys some items from shoppings.com he/she will get some points like you said credit amount. And this points will be added to their account wallet. For this requirement, I can use the extensions like Vivek mentioned in his answer.

But in members.com, the same user can buy items using this points from wallet not using actual currency payment. This is the part where I'm stuck.


texts: How to display the items added to the Cart in cart pop up

texts:
I am working in magento 1.9.2.2.  I am trying to add cart pop up and list the items added in the cart without using any extension.the pop up is appearing successfully. I dont exactly know how to list the items added to the cart with its name, price and items image in the pop up. I just wanted to know how to retrieve the item collection. My code which is not working:

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

                <?php $cartitem = Mage::getModel('checkout/cart')->getQuote();
                <?php if(count($cartitem)> '0'){
                    foreach ($cartitem->getAllItems() as $pro) {
                        $productId = $pro->getProductId();
                        $product = Mage::getModel('catalog/product')->load($productId);
                        $productName = $product->getName();
                        $productPrice = $product->getPrice();
                }
                } ?>

     <?php else: ?>

                         Your Shopping Cart is empty.

                What are you waiting for? Start shopping!

<?php endif ?>


texts: How do I create a unique table for each product?

texts: I created a table of information for my products with html and css. The problem is now : I got the same table for all my products and I need always a unique version for each product. So what file do I need to edit?


texts: Override class in setup:upgrade command in magento2

texts:
I am trying to override the class FilePermissions (magento/framework/Setup/FilePermissions.php) but my changes are not taken in account while I use the bin/magento setup:upgrade

I tried :

To add a new preference in my di.xml, but the rewrite is not taken in account
To use a plugin instead of a rewrite but it didn't work either

It seem that the module Magento_Setup have some particular behavior compared to other modules in term of bootstrapping.

Does anyone succeed to override method during magento setup command ?

Thank for your help


texts:
I want to decrements item qty programmatically.

    $item = $this->cart->getQuote()->getItemById($itemId);
    $qty = $item->getQty();

    if($qty > 0) {
        $newqty = ($qty - 1);
        $item->setQty($newqty);
        $item->getProduct()->setIsSuperMode(true);
        $item->save();
        $this->cart->save();
    }

Please help me in this.


texts: Magento 2: Overriding email CSS in custom theme

texts:
I have created my own custom theme. When customer places an order, order email does not load css correctly. I directly changed in core css files of luma and blank theme but it seems like fall back is not working as magento is not showing my changes even after updating core files.

Any idea why its not loading css or is there any way override email css in my custom theme so that css should be loaded.


texts: How to Save an Order Without Processing payment Programatically in Magento 2

texts:
I want to add New Order in Magento 2.3.4 I don't want to process payment how I can do this?

Need Help


texts: Apply custom discount rule on products before magento default catalog promotion rules

texts:
i have a situation where i need to apply a custom price (calculated based on cost price) on products before catalog promotion rules being applied. Currently i have successfully applied product price by overriding

getPrice()

method from /app/code/core/Mage/Catalog/Model/Product/Type/Price.php and

catalog_product_collection_load_after

event. but it blocks catalog rule to be applied. i.e default catalog rules are now disabled.
In short i want to modify product price before catalog rule being applied. Is there a way i can achieve this? Thanks in advance for any kind of help.


texts: Is there a way to mass dump all wishlists?

texts: Is there a way to clear all items saved in all of your customers wishlists?  I want to clear invalid skus from being purchased.


texts:
How can i add a custom attribute to the product view h1 title?

I have created a new module with your files and this files:

  /app/code/ELLA/Producttitle/etc/frontend/routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
    <route id="producttitle" frontName="producttitle">
        <module name="ELLA_Producttitle" />
    </route>
</router>

  /app/code/ELLA/Producttitle/etc/module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="ELLA_Producttitle" setup_version="1.0.0">
</module>

  /app/code/ELLA/Producttitle/registration.php

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

  app/code/Namespace/Modulename/view/frontend/layout/catalog_product_view.xml

<referenceBlock name="page.main.title">
<action method="setPageTitle">
    <argument name="title" xsi:type="helper" helper="Namespace\Modulename\Helper\Data::getTitle"></argument>
</action>

  /app/code/Namespace/Modulename/Helper/Data.php

<?php

namespace Namespace\Modulename\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $registry;

    public function __construct
    (
        \Magento\Framework\Registry $registry
    ) {
        $this->registry = $registry;
    }

    public function getTitle()
    {
        $this->product = $this->registry->registry('product');
        $title = $this->product->getAttributeText('manufacturer');
        return $title;
    }
}

Nothing would happen. You have an idea?


texts:
I am using version 1.9.  When I click on System->Import/Export->Export I am presented with a screen where I can chose Entity Type and Export File Format.  From the Entity Type drop down box I chose Products.  And from the Export File Format drop down box I chose CSV.  I am then presented with a list of entity attributes that I can exclude from the export.  I don't chose to skip any of them, I want all of the attributes exported.  I then click on Continue.  After about 45 seconds, the screen goes blank.  That's it.  No export.

We had this same behavior when we were using version 1.7.  We upgraded to 1.9 in the hopes that the upgrade would fix the problem.

What is wrong with the export function?  It did work for a long time while we were using version 1.7.


texts: What are other possible functions i can access

texts:
I created placed custom html in Magento_Catalog>template>product>view>details.phtml file in Magento_Catalog module and added below code to get current product ID and name

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');
$_product_id = $product->getId();
$_product_name = $product->getName();

What are the other functions to get product details like Price, Images, Short & Long description, etc...

Please sugest me the list of functions i can use to get product details.

Please help me if you know answer to this Question also


texts:
Anyone know best practice to go from CE 1.8 to CE 1.9.4 ?
I ran these:

chmod 750 mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage sync
./mage install https://connect20.magentocommerce.com/community Mage_All_Latest --force

But got a

  fatal error. Unknown function: is_dir_writeable().


texts: How can I add custom field to collection?

texts:
I have a output structure of collection like this:

I need such a structure filled with a specific value:

How do I achieve this?


texts: add a custom field in customer account just visible in admin

texts:
I want to add a text box in the customer information
This text box appears only in admin, just visible in admin area
I would like information about each customer is stored in the TextBox

Is there a solution?


texts: Code Review: Trying to get popular categories

texts:
On a main category page there is a section for "popular ranges" where a range is a different sub category.
A simplified version of my category structure is:
root
|-Bathrooms
|--Sinks
|--Cabinets
|-Bedrooms
|--Lights
|--Beds
|-Ranges
|--Deor
|--Puro

Products will belong to multiple categories.
The below code is designed to get the popular ranges of products for the current sub-categories. The category has a landing-page style template and has is anchor set as no (so no products will be shown on the main category pages).
To clarify, the below code is getting the popular products for the current sub-categories, checking which range categories the products are in, and showing those range categories.
For example, Multiple Deor products have been sold in the Bathroom Sinks page, but no Puro products at all have been sold. So on the Bathroom page I want to show only the Deor Category.
//11 = ranges category
$ranges = array_flip(explode(',', Mage::getModel('catalog/category')->load(11)->getChildren()));
foreach($ranges as $key => $range) {
    $ranges[$key] = 0;
}
//list of popular products for current sub-categories
$products = Mage::getResourceModel('reports/product_collection')
                ->addOrderedQty()
                ->joinField(
                    'category_id', 'catalog/category_product', 'category_id',
                    'product_id = entity_id', null, 'left'
                )
                ->addAttributeToSelect('*')
                ->setOrder('ordered_qty', 'desc')
                ->addAttributeToFilter('category_id', array('in' => explode(',', $_category->getChildren())));
//Work out popular range category
foreach($products as $product) {
    foreach($product->getCategoryIds() as $cat_id) {
        if(array_key_exists($cat_id, $ranges)) {
            $ranges[$cat_id]++;
        }
    }
}
//sort range categories so popular first
asort($ranges);
//remove ranges that have not been used
foreach($ranges as $key => $value) {
    if ($value < 1) {
        unset($ranges[$key]);
    }
}
//only want 4 categories
array_slice($ranges, 0, 4, true);

//fetch our range categories
if(count($ranges) > 0) {
    $rangesCollection = Mage::getModel('catalog/category')
                            ->getCollection()
                            ->addAttributeToFilter('entity_id', array('in'=>array_keys($ranges)));
}

//another foreach loop showing range names, images and links.
//...

This code has a LOT of foreach loops. Is there a way to refactor all of the above to reduce the number of loops and make the whole thing a lot more efficient?
edit
Made the first block of code more efficient (instead of iterating of several categories, we are getting the parent category and getting child ids, then setting the value as 0 for each subcategory/range).