texts: Magento Free Shipping settings for specific customer groups

texts:
We are developoing website in Magento 2.2 and we have specific customer group (BlackCard Membership) for which we have to apply free shipping for all type of orders.

How should I create a new shipping method or shipping rules for this user group so all orders will have free shipping.

Please share the steps or help in this.

Thanks


texts: after upgrade from 1.7 to 1.9.1 order not saving after sagepay payments plus payment complete message not showing

texts:
I have upgraded magento from 1.7 to 1.9.1. I have fixed paypal and it is all working and payment saving.

But Sagepay payments have 2 issues:

1) After payment has made it through Sagepay it redirects to shopping cart and no payment complete message is shown after paying. So the customer does not know if she has paid successfully.

2) The order created cannot be processed in the backend. However for Paypal it is saving properly. So only issue with Sagepay payment.

can anyone share his experience with this issue or offer an idea?

thanks


texts: Force all links in admin area to use www

texts:
Is there a way to force all links in the Magento admin area to use www?

We have a site that's been around for a long time and all the frontend URLs are indexed with 'www' at the start.

There were some issues with the htaccess rules which I've now changed to force all paths to have 'www' in and use https.

Now when we use the admin area we cant search any of the grids, we just get an ajax searching wheel and it gets stuck showing just an empty page (with header and footer, the grid just disappears)

If I check in the console it flags a CORS error. I think this is because all the links point to the non www domain instead of the 'www' version.

I tried adding this to the htaccess to allow cross-origin requests but it didn't seem to work.

<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>

So, can anyone tell me which file or DB entry to change to force all the links to use the www version?


texts:
Anyone can help me this problem ?

Please execute 'magento-cli' instead of 'magento' that uses the proper user to execute any Magento's command

This problem happen when i run command : php bin/magento setup:upgrade

Thanks


texts: Do I need to add shipping address every time whenever I place a new order in Magento 2 REST API?

texts:
STEP 1 - Using REST API I created a customer,And in address data I passed
    default shipping and billing true

"defaultShipping": true,
"defaultBilling": true,

STEP 2 - In GET customer detail API it returns true value for defaultShipping and defaultBilling

STEP 3 - But when I fetch the shipping methods using rest/V1/carts/mine/shipping-methods API to place and Order it return me the error

  "message": "Shipping address not set."

So Magento 2 REST API is not fetching  defaultShipping address value.

And I need to add shipping address every time whenever I place a new order to fetch shipping methods and charge with this API.

POST http://host/rest/V1/carts/mine/estimate-shipping-methods

  Is there any Alternate solution available to pass defaultShipping
  address data to get shipping-methods and shipping-charge without adding new
  address every time I place a new order ?


texts: How to Change Weight Unit in Magento 2 for Migrated Products

texts:
I have recently migrated my store from OpenCart. I have around 2700+ products. In OpenCart Grams as unit was available but not available in Magento 2. Is there any non-programing option available to Add/change weight unit in magento2. My current magento version is 2.2.6.

Converting and changing all 2700+ product weight manually is not an easy option.

Please suggest.

Thanks,
Niraj


texts: How to create admin grid without db collection in Magento - 2

texts:
My requirement is to display a grid of data from a web service with search and sort functionalities. Currently what I am doing is, storing all the data from the web service into a db table and displaying those values in the admin grid using that db collection.

In Magento-2, is it possible to create an admin grid with filter and sort functionalities, without using the db collection.

Thanks...


texts: How to export current page as a PDF in magento?

texts:
i wants to export following Phtml page in PDF formate...

<?php if ($this->helper('wishlist')->isAllow()) : ?>

        <?php if ($this->helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?>
            <a href="<?php echo $this->helper('wishlist')->getRssUrl($this->getWishlistInstance()->getId()); ?>" class="link-rss"><?php echo $this->__('RSS Feed') ?>
        <?php endif; ?>

<?php echo $this->getTitle(); ?>

    <?php echo $this->getMessagesBlock()->toHtml() ?>

    <form id="wishlist-view-form" action="<?php echo $this->getUrl('*/*/update', array('wishlist_id' => $this->getWishlistInstance()->getId())) ?>" method="post">
        <?php echo $this->getChildHtml('top'); ?>

            <?php if ($this->hasWishlistItems()): ?>
                    <?php echo $this->getBlockHtml('formkey');?>
                    <?php $this->getChild('items')->setItems($this->getWishlistItems()); ?>
                    <?php echo $this->getChildHtml('items');?>

            <?php else: ?>

<?php echo $this->__('You have no items in your quote.') ?>

            <?php endif ?>

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

    </form>

    <form id="wishlist-allcart-form" action="<?php echo $this->getUrl('*/*/allcart') ?>" method="post">
        <?php echo $this->getBlockHtml('formkey') ?>

            <input type="hidden" name="wishlist_id" id="wishlist_id" value="<?php echo $this->getWishlistInstance()->getId() ?>" />
            <input type="hidden" name="qty" id="qty" value="" />

    </form>

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

<a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>">&laquo; <?php echo $this->__('Back') ?>

<?php endif ?>


texts: Magento admin form date widget week number differs from jquery UI week number

texts:
For a project I am working on we need to know the week number which is displayed via a date form field widget in the admin section.

On the front end we also show the week number but we are using a jQuery UI datepicker, however these two datepickers are showing different week numbers. This week starting 15/6/2015 is shown as week 25 in jQuery UI and is week 24 in Magento admin date picker.

After some investigation I have found jQuery is using ISO 8601 week date standards to determine the first week of the year.

I am still not sure what format Magento is using but it seems to have some errors displaying at years end/start when I look ahead years.

I am hoping for some setting or fix that I can implement to bring Magento date picker in line with jQuery UI and ISO 8601, I could do the reverse but prefer to follow ISO 8601 standards.


texts: Magento - getCustomer() giving unexpected results

texts:
I am experiencing some odd results when using Magento's

Mage::getSingleton('customer/session')->getCustomer();

I have the below code to first check if the customer is logged in, and if so to get the firstname of the logged in customer:

if(!$this->helper('customer')->isLoggedIn())
{
    $name = Mage::getSingleton('customer/session')->getCustomer()->getFirstname();
    print 'Hello '.$name;
    // ...
}

Most of the time this works fine and if Joe Bloggs is logged in then it outputs:

Hello Joe

But every now and then, and it seems to be when a high amount of customers are logged in I get unexpected outputs with other names

Hello Lucy
or
Hello John

Is Mage::getSingleton('customer/session')->getCustomer() a foolproof way of getting the customers details or is it possible it's getting another logged in customers details? Or have I got a problem with my sessions mixing up?


texts: CMS static block not displaying preview in admin panel Magento 1.9.0.1

texts:
Magento admin panel not displaying preview of images and texts like cms-admin-preview.png

It is now displaying like this in cms-admin-not-preview.png

If anyone has faced this issue then please help me solve this.


texts: Default currency not showing per store view

texts:
I have setup multistore as follows:

Website A

   Store A
   StoreView A Default currency(GBP), Allowed currencies (EURO) + (GBP)

   Store B
   Storeview B Default currency(EURO), Allowed currencies (GBP) + (EURO)

The problem is when I switch to StoreView B the default currency is still showing (GBP) even though I have set the default currency as (Euro).

Has anyone else had this problem and been able to fix it? Please let me know as I am banging my head off of the desk...


texts: Magento 2.1.8 multiple JavaScript Requests

texts:
I have set following configurations in admin ;
 Enable JavaScript Bundling: Yes
 Merge JavaScript Files: Yes Minify JavaScript Files: Yes
 and have done similar with CSS.
 When I test my site with http://www.webpagetest.org I still see multiple JavaScript Requests - see screenshot. The domain is http://www.extenderstore.com.au - why is this occurring?


texts:
Had a quick question in regards to potential solutions for this defined functionality: I know there are a few solutions that somewhat work, unirgy, marketplace multi vendor module.

Functionality: is based on creating subset vendors from the admin portal (only to allow the backend connection of each vendors products). There is no need for vendors to have their own portal to list products, as the admin will be taking care of that.

1) Admin section allows creation of vendor

2) Admin creates and assigns product to vendor

3) Product is listed on front end as magento normally would and doesn't show any vendors names just product information.

4) Customer can purchase product and check out as magento normally would.

5) Admin can pay vendor percentage of checkout via Paypal Adaptive.

So instead of it being admin->products it would be:

Admin->Add/Use Vendor

Admin->Add/Modify Products for that vendor

Admin->Pay Vendor->Paypal Adaptive

I'm wondering if the two solutions I listed above would be a good fit or if/ they are too robust/lacking for this.


texts: Difference between www.mysite.com and www.mysite.com/homepage

texts:
I have a CMS page used for the homepage on the site with the identifier 'homepage'.

I have also called some extra blocks inside local.xml inside the <cms_index_index> tag in local.xml, see below (for example the home.featured.products block called at the bottom of the page) :

<cms_index_index translate="label">

    CMS Home Page

    <remove name="page_content_heading" />
    <remove name="cms.wrapper" />

    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/jquery/column-height-init.js</name><params/></action>
    </reference>

    <reference name="content">
        <block type="core/template" name="homepage.blocks" template="cms/homepage/homepage-blocks.phtml">
            <block type="qbanner/qbanner" name="qbanner.home" template="qaz/qbanner/qbanner.content.top.phtml" />
            <block type="core/template" name="home.collection.links" template="cms/homepage/collection-links.phtml" />

            <block type="core/template" name="rss.feed" template="cms/homepage/rss-feed.phtml" />
            <block type="core/template" name="featured.products" template="catalog/product/featured-products.phtml" />
            <block type="core/template" name="latest.blog.home" template="cms/homepage/latest-blog-home.phtml" />
            <block type="core/template" name="twitter.feed" template="cms/homepage/twitter-feed.phtml" />

            <block type="core/template" name="page_content_heading.home" template="cms/homepage/content_heading.phtml" />

            <block type="page/html_wrapper" name="cms.wrapper.home" translate="label">
                CMS Content Wrapper
                <action method="setElementClass"><value>std</value></action>
                <block type="cms/page" name="cms_page"/>
            </block>
        </block>
    </reference>
</cms_index_index>

My problem is that this is working fine if I go to http://www.mysite.com/, but if I go to http://www.mysite.com/homepage then the XML above is not being applied, I guess because http://www.mysite.com/homepage is not treated as the CMS index?

I have set the Home page in System...Config...Web..Default Pages as this page.

Is there any way I can overcome this? I have a complaint from a client that the "Preview" link in the Magento admin panel under CMS...Pages is not showing the homepage correctly (because the Preview link is going to http://www.mysite.com/homepage)

I'm using Magento 1.8.1.0... thanks!


texts: How will you join flat table and EAV table in Magento?


texts: Unable to display proper format in email using transport builder in magento2

texts:
I am trying to display string as
Hello, Welcome
\n in my local mail. But it is display with given html tag instead of only string.

Let me know how it can be solve or what can be its solution.

$emailTemplateVariables = array();
            $emailTemplateVariables = $this->getRequest()->getParams();
            $headers = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

                $this->_transportBuilder->setTemplateIdentifier($this->_template)
                ->setTemplateOptions(array('area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $store))
                ->setTemplateVars($emailTemplateVariables)
                ->setFrom(['name' => ' Admin','email' => 'admin@support.net'])
                ->addTo($to,"Admin");


texts: Set product inventory per day for lessons

texts:
Hello I have been out of the Magento sphere for a while, hopefully someone can point me in the right direction, or tell me I can't do it. I am looking for a way to set up an inventory/limit for a product that would be based upon date, not just an arbitrary number for all.

We want to sell ski lessons online, but need to limit the number of lessons ordered per date/time per day.

Ex.

Some one wants to buy a lesson for 1:30pm on the 25th.

Jan 25.

10am - 2 available
11am - 2 available
12pm - 1 available, 1
ordered
1:30pm - 2 available
2:30pm - 0 available 2 ordered


texts:
I want to override a core plugin in Magento\Sales\Controller\Order\Plugin -> Authentication.php
Is this even possible to achieve.


texts: change position of the configure option to top

texts: I want to Bring configure drop down tab on the top at the right hand side of the product pictures and Short description at the bottom in product view page


texts: Magento2: How to add a confirmation message after a message is sent via Contact Us?

texts:
we have a Contact Us form that is used for customer to enter questions/comments.  Although the email is sent out there is no confirmation page that says something like  "Your message has been sent". Is there anyway to add this?

thanks!
Ahdee


texts: Missing custom product attribute value in getData()

texts:
I have created a multiselect catalogue product attribute labelled dangerous (attribute ID: 1202) which should work exactly like an existing custom attribute sport (attribute ID: 1200).

The attribute is set up with the following options:

Scope: Global
Use In Layered Navigation: Filterable (with results)
Used in Product Listing: Yes

My new dangerous attribute shows up properly in the product edit form in a multiselect dropdown. When I select options and save the product I can see the database getting updated.

The only problem I have is that I can't seem to get the dangerous attribute value via the getData() method.

Mage::getModel('catalog/product')->load(494643)->getData() returns

Array (
    ...
    [supplier_warehouse] => United Kingdom
    [sport] => 4000
    [dangerous] =>
    [meta_keyword] => Nike Livestrong, Summer Cap (Black), Black, Headwear
    ...
)

and both Mage::getModel('catalog/product')->load(494643)->getDangerous() and Mage::getModel('catalog/product')->load(494643)->getData('dangerous') return null.

On the other hand, this query:

SELECT
    cpe.entity_id AS product_id,
    cpev_sport.value AS sport,
    cpev_dangerous.value AS dangerous
FROM catalog_product_entity AS cpe

LEFT JOIN catalog_product_entity_varchar AS cpev_sport
ON cpev_sport.attribute_id = 1202
AND cpe.entity_id = cpev_sport.entity_id

LEFT JOIN catalog_product_entity_varchar AS cpev_dangerous
ON cpev_dangerous.attribute_id = 1200
AND cpe.entity_id = cpev_dangerous.entity_id

WHERE cpe.entity_id = 494643

returns

+------------+-------+-----------+
| product_id | sport | dangerous |
+------------+-------+-----------+
|     494643 | 4000  | 4087      |
+------------+-------+-----------+
1 row in set (0.00 sec)

Am I missing something obvious? Please note that I tried reindexing and clearing all types of cache, in vain so far.

EDIT: Additional info
I am using multi-store indeed but these attributes have a global scope (store ID: 0).
I have tried reindexing and clearing cache.


texts: Creating filterable selectbox attribute using SOAP API v2

texts:
I am creating attributes using the Magento SOAP API V2, and need a few filterable attributes. I am using the following array:

$array = array(
    "attribute_code" => "testattribute",
    "frontend_input" => "select",
    "scope" => "store",
    "default_value" => "",
    "is_unique" => 0,
    "is_required" => 0,
    "apply_to" => "",
    "is_configurable" => 0,
    "is_searchable" => 0,
    "is_visible_in_advanced_search" => 0,
    "is_comparable" => 0,
    "is_used_for_promo_rules" => 1,
    "is_visible_on_front" => 1,
    "used_in_product_listing" => 1,
    "additional_fields" => array(
        "is_filterable" => 1,
        "is_filterable_in_search" => 1,
        "position" => 0,
        "used_for_sort_by" => 0
    ),
    "frontend_label" => array(
        array("store_id" => "0", "label" => "This"),
        array("store_id" => "1", "label" => "That")
    )
);

$client->catalogProductAttributeCreate($session, $array);

According to the documentation, this should work. It does create a select attribute, but does not make it filterable. To make it filterable i still have to do it manually in Magento. I can do this by hand, and that won't be a big problem, but it is strange that this doesn't work and I'd like to know if I'm doing something wrong or if this is an actual bug.


texts:
why does magento 2 only observes sales_convert_order_item_to_quote_item for admin reorder?
i need to carry over some custom fields from order_item to quote_item and im using
\Magento\Framework\DataObject\Copy $objectCopyService

its working fine for admin reorder. but i cant seem to find the event or function to pluginize to do the same for the customer reorder function.
whats left for me is to overwrite Magento\Sales\Model\Reorder\Reorder execute() function. would that would be the remaining option for me to do?


texts: Magento 2 not able to get creditmemo collection

texts:
I am trying to get credit memo collection with following script but am unable to get the collection

class Creditmemosync extends \Magento\Framework\App\Action\Action {

protected $helper;

protected $logger;

protected $resourceConfig;

protected $creditmemoRepository;

public function __construct(\Magento\Framework\App\Action\Context $context,
                            \VestricsM2\Connector\Helper\Data $helper,
                            \Magento\Config\Model\ResourceModel\Config $resourceConfig,
                            \Magento\Sales\Api\CreditmemoRepositoryInterface $creditmemoRepository,
                            \Psr\Log\LoggerInterface $logger
) {
    $this->helper = $helper;
    $this->logger = $logger;
    $this->resourceConfig = $resourceConfig;
    $this->creditmemoRepository = $creditmemoRepository;
    parent::__construct($context);
}

 public function execute(){
    $creditmemos = $this->creditmemoRepository->getList();
    echo "<pre>"; print_r($creditmemos);
 }
}


texts:
I wrote a script for adding products programatically from a CSV. It's working fine. Now I need to update it to do followings,

Check if product is already available (using SKU ) and if not, add
new product.
If product is available, then update it with new values from the CSV (not changing the SKU but if there are any changes on name, category or price etc..)

I've successfully implemented the first one. I'm stuck on second.

How can I achieve this? Do I need to read every column for certain item and check whether each values is a match in both magento and CSV? or is there some other way to do so? Please help me.

Reading every column for each item may take very long time. I'm looking for some other option.

I just need to update new values from CSV for products that already imported into magento. (without changing the SKU).


texts: What is the process flow of calculation while we add product to cart in Magento

texts:
What is the process flow of price calculation of product while we add a new product to cart in Magento. I have to consider following prices in order to clarify/ Debug the issues.

Catalog Price Rule.
Group Price of product.
Tier Price
Special Price.
Shopping cart price rule.


texts: Error After install Custom Module in Magento 2

texts:
I have developed a custom module in magento 2. I have installed the module but getting error like below.

1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /var/www/html/Magento-CE-2.1.9/vendor/magento/framework/Phrase.php on line 69

Exception #0 (Exception): Notice: Array to string conversion in /var/www/html/Magento-CE-2.1.9/vendor/magento/framework/Phrase.php on line 69

When I disable the module everything works perfect. Can anyone please let me how can I resolve this. I am using PHP Version 7.0.25 and Magento version 2.1.9


texts: custom cart price rule type in magento 2.1.0

texts:
In Magento 1.x and 2.0.x, used the event adminhtml_block_salesrule_actions_prepareform to add custom cart price rule type.

But, from 2.1.0 onwards it is not working. Can anybody help on how to integrate custom rule types in cart price rule?

The code for the observer code in 2.0.0 is as below and it was working.

public function execute(Observer $observer) {
    $actionsSelect = $observer->getForm()->getElement('simple_action');
    if ($actionsSelect) {

        $values = $actionsSelect->getValues();
        $values[] = array(
            'value' => 'my_promotions_percent',
            'label' => __('Reset price to percentage of actual price'),
        );
        $values[] = array(
            'value' => 'my_promotions_fixed',
            'label' => __('Reset price to new fixed price'),
        );

        $actionsSelect->setValues($values);
    }
    return $this;
}


texts: No 'Access-Control-Allow-Origin' header is present on the requested resource. Unknown link "http://ownsafety.org/opp.php"

texts:
I am using IWD One page checkout for my Magento site. On the checkout page, when I try to log in using IWD's login button, following error is printed in browser's console:

  XMLHttpRequest cannot load http://ownsafety.org/opp.php. No 'Access-Control-Allow-Origin' header is present on the requested resource.
  Origin 'http:/ /beta.mysite.in' is therefore not allowed access.

I do not know from where "http://ownsafety.org/opp.php" this url is coming. I think because of this error I am not able to login.


texts:
Here is my code

<?php
namespace Namespace\InventoryManagement\Helper\Product;

/**
 * Created by PhpStorm.
 * User: abbas
 * Date: 17. 7. 14
 * Time: 오후 4:02
 */

use Magento\Framework\App\Helper\AbstractHelper;

class Inventory extends AbstractHelper
{

    /**
     * @var \Magento\Catalog\Model\ProductFactory
     */
    protected $_productFactory;

    /**
     * Store manager
     *
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * Status constructor.
     * @param \Magento\Framework\App\Helper\Context $context
     * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
     */
    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Catalog\Model\ProductFactory $productFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager
    )
    {
        parent::__construct($context);
        $this->_productFactory = $productFactory;
        $this->_storeManager = $storeManager;
    }

    /**
     * @return Store
     */
    protected function _getStore()
    {
        $storeId = 2;//(int)$this->getRequest()->getParam('store', 0);
        return $this->_storeManager->getStore($storeId);
    }

    public function getInventory($storeCode){
        try {
            $result = array();

            $store = $this->_getStore();

            $collection = $this->_productFactory->create()->getCollection()->addAttributeToSelect(
                'sku'
            )->addAttributeToSelect(
                'name'
            )->addAttributeToSelect(
                'attribute_set_id'
            )->addAttributeToSelect(
                'type_id'
            )->setStore(
                $store
            );

            $collection->addStoreFilter($store);

            $i = 0;
            /**
             * @var \Magento\Catalog\Model\Product $product
             */
            foreach ($collection as $product){
                if($product->getData('transferred'))
                {
                   continue;
                }
                $result[] = $i;
                $i++;
            }
        }
        catch (\Exception $e){
            $success = false;
            if($product) {
                $result = $e->getMessage() . ' == ' . $product->getSku();
            }else{
                $result = $e->getMessage();
            }
        }

        return $result;

    }

}

It is a very simple code but here for collection it is returning all products and not applying the store filter.

Can you please let me know what is the issue here? I am using the Magento 2.2.5


texts: I want to automatically add the bundle product to the cart

texts:
Simple products are added to cart and everything is fine, but bundle products are not added to the basket.

 $params = array(
                    'product' => $products_id,
                    'qty' => $products_count
                );
                $_product = $this->_productRepository->getById( $products_id );
                $this->_cart->addProduct($_product,$params);
                $this->_cart->save();

give an error , 1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please specify product option(s).


texts:
We have been having customers register with a capital letter in their email address. When they come back to login, they do not enter it capitalized and then cannot login.

How can we make it so that the email address is always submitted lowercase, or make it case insensitive during the login?


texts: New order admin email notification is not receving on multiple email address

texts:
I have recently configured new order notification email for two different email ids but i received order notification on only first email but not receiving on second email or more and i am using default magento sender email sales@example.com and magento version is 1.9.0.1. I have also tried using comma like demo@gmail.com,demo1@gmail.com but it is not working.
So please let me know how i configured it.

Thanks


texts:
I am new to working on the command line and have tried to venture in to using n98-magerun.

So far I have

downloaded it
placed it in the folder that holds all my sites
sym-linked it to the folder i am working in
aliased it with mag
followed the first half of tutorial 1 in the alan storms "quickies" blog

But I am now at a sticking point, which is the command

mag extension:list

when I input this the cursor moves to the following blank line and after about a minuet of seemingly doing nothing the cursor moves to another new line (resetting itself) and returns nothing.

I have tried other command such as

mag --help and mag dev:module:rewrite:list

These work as expected, so why won't mag extension:list return anything? (I was expecting to get a full list of all the modules in my Magento install)


texts:
I'm listing out my categories on the homepage, but I only want to list out 7 categories on the homepage for now.  Here is my code:

<?php
$categories = $this->getStoreCategories(true,false,true);
$categoryHelper = $this->getCategoryHelper();
?>

<?php
foreach($categories as $category):
     if (!$category->getIsActive()) {
        continue;
     }

?>

<a href="<?php echo $categoryHelper->getCategoryUrl($category) ?>"><?php echo $category->getName() ?>
<?php if($childrenCategories = $this->getChildCategories($category)): ?>

        <?php
        foreach($childrenCategories as $childrenCategory):
             if (!$childrenCategory->getIsActive()) {
                continue;
             }
        ?>

<a href="<?php echo $categoryHelper->getCategoryUrl($childrenCategory) ?>"><?php echo $childrenCategory->getName() ?>

        <?php endforeach; ?>

<?php
endif;
endforeach;
?>

I'd also like to limit the child categories to only 3.  I know this is probably a simple php edit, but I'm currently stuck on it.


texts: how to make VAT Number optional in magento 2 checkout for new customers

texts:
I enabled the VAT Number in Magento 2 admin
I want to make the field is optional
how i can do this??


texts: User permissions to view products but make no changes

texts:
I've created a user-role "staff" that I've limited permissions for, but I'm having trouble changing the permissions so that the user can see the catalog but not make any changes to those products.

Is this functionality possible in core magento?


texts:
I have followed other tags and I have the following code in my default.xml in my child theme. All the other compare functions are disabled with this code except for on the product page. Why won't this disable compare on the product page?

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="catalog.compare.sidebar" remove="true"/>
    <referenceBlock name="catalog.compare.link" remove="true"/>
    <referenceBlock name="related.product.addto.compare" remove="true"/>
    <referenceBlock name="view.addto.compare" remove="true"/>
    <referenceBlock name="upsell.product.addto.compare" remove="true"/>
</body>
</page>


texts: Magento 2 addProductsFilter to Stock Item collection

texts:
In Magento 1 you were able to add a product filter to a Stock Item collection in the Mage_CatalogInventory_Model_Resource_Stock_Item_Collection class. This functionality appears to be missing along with the other methods included in the Magento 1 class.

Additionally, it appears that you cannot addFieldToFilter to a Stock Item collection due to the models that it extends (i.e.

Magento\Framework\Data\AbstractSearchResult

is extended as opposed to something like the Product Collection of which extends:

Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection)

So my question is, how are you supposed to add a product filter to a stock item collection on Magento 2 (And indeed if it's possible).

Any help is appreciated!


texts: Magento 2 :get product image ,price and name

texts:
I am new to Magento2 and working on the custom theme. I am trying to include product image,  price, and name but they are not displaying.

This is my code.

<?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $abstractProductBlock = $block->getLayout()->createBlock('\Magento\Catalog\Block\Product\AbstractProduct');
    $productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
    $collection = $productCollection->create()
                ->addAttributeToSelect('*')
                ->addAttributeToSort('created_at', 'DESC')
                ->setPageSize(8)
                ->load();
?>

          <?php foreach ($collection as $product) :?>
      <img src=<?php echo $abstractProductBlock->getImage($product, 'latest_collection_list')->getImageUrl(); ?>" alt="<?php echo $product->getName(); ?>" />

$56

Easy Polo Black Edition

         <a href="<?php echo $product->getProductUrl(); ?>"> class="btn btn-default add-to-cart">Add to cart

<?php echo $abstractProductBlock->getProductPrice($product) ?>

 <?php endforeach;  ?>

Products are not showing but there is no error.


texts: Can (and if so how) one modify the RSS feeds in order to include additional data without extensions?

texts:
I'm currently working with a Magento 1.9.x Community Edition instance, trying to get an AvantLink metric tracking system to work properly.  Most of the work has been done; they're seeing the calls to their tracking script from the success.phtml page with no issues.  The problem is that they also need access to an RSS feed (they prefer Google Shopping format, I guess, but said that the standard RSS as is built in to Magento would be fine as well [legacy?]), and that can provide data on our products.

After making certain that all of the RSS capabilities [built in] were enabled, I gave them the URL, and they were able to successfully pull the feed.  Unfortunately, while the feed gives them some of what they need, they are still missing the following vital bits of information:

id
product_type
image_link
price
sale_price

I've looked everywhere that I can in the admin page, and I've done plenty of google searching, with my (admittedly limited) google-fu.  I've been able to turn up plenty of for-pay extensions that'll export a Google Shopping RSS feed, or other RSS feeds, that can be customized to this extent, I believe, but I'm not going to be able to sell my clients on a non-free extension to get this working.

Does anybody know if there is a way that I can add these fields to the RSS feeds, via the admin control page?  If not, can anybody direct me to the appropriate locations, in code, where I might be able to code these additions myself?  As always, any helpful tidbits, or even pointers in vaguely correct directions, are greatly appreciated.

Thanks in advance.  Please feel free to let me know, if I've left out any information that is necessary for figuring this out.

-Damon


texts: magento2 in production mode Nwdthemes Revslider not working

texts:
On local server in developer mode revslider works fine. When change mode to production, enable all caches slider not working.
My steps on production server:
 1. eneble all cashes
 2. php bin/magento setup:upgrade
 3. php bin/magento setup:di:compile
 4. php bin/magento setup:static-content:deploy
In console no errors, and slider not shoving


texts: Translation Not Happen - Magento CE 2.0.1

texts:
I am learning about translation. I have done below steps to translate one field in product detail page but it did not work. I am not sure about I am going right way

step1: copy the i18n folder from Magento_Catalog then paste into my custom theme <magento-root>/app/design/frontend/Chennaibox/Theme/

step2: Rename CSV file into fr_FR.csv. In that CSV I have changed second column QTY field into number of materials

step3: change language in admin side to french(france) (Store->Configuration->General->loacle option->local)

step4: clear cache,static files then refresh front-end but still QTY only displayed.

What did I wrong here?

note: locale(fr_FR)is also generated in pub/static.But I don't know why its not get reflect.


texts: Configurable product and its associated product creation using soap api documentation is not in magento api guide.any idea?

texts:
I am trying to create a configurable product and its associated product using magento soap api.Product created successfully but configurable product linking with associated product is not working properly guys any idea?Here is my code

<?php
$client = new SoapClient('https://sample.com/api/v2_soap?wsdl=1');

// If some stuff requires api authentification,
// then get a session token
$session = $client->login('username', 'Password');

// get attribute set
$attributeSets = $client->catalogProductAttributeSetList($session);
$attributeSet = current($attributeSets);
print_r($attributeSet);
$result = $client->catalogProductCreate($session, 'simple',72, 'product_sku0002', array(
    'categories' => array(2),
    'websites' => array(1),
    'name' => 'Product name',
    'description' => 'Product description',
    'short_description' => 'Product short description',
    'weight' => '10',
    'status' => '1',
    'url_key' => 'product-url-key',
    'url_path' => 'product-url-path',
    'visibility' => '4',
    'price' => '100',
    'tax_class_id' => 1,
    'meta_title' => 'Product meta title',
    'meta_keyword' => 'Product meta keyword',
    'meta_description' => 'Product meta description',
    'additional_attributes' => array(
        'single_data' => array(
            array(
                'key'   => 'color',
                'value' => 'Red', // Id or label of color, attribute that will be used to configure product
            )
        ),
    ),
));
var_dump ($result);
$result = $client->catalogProductCreate($session, 'configurable',72, 'Configurable_product_sku0001', array(
    'categories' => array(2),
    'websites' => array(1),
    'name' => 'Confihurable Product name',
    'description' => 'Product description',
    'short_description' => 'Product short description',
    'weight' => '10',
    'status' => '1',
    'url_key' => 'product-url-key',
    'url_path' => 'product-url-path',
    'visibility' => '4',
    'price' => '100',
    'tax_class_id' => 1,
    'meta_title' => 'Product meta title',
    'meta_keyword' => 'Product meta keyword',
    'meta_description' => 'Product meta description',
    'associated_skus' => array('product_sku0002'),
    'price_changes' => array(
        array(
            'color' => array(
                'Red' => '0'
            )
        ),
    ),
));
var_dump ($result);
?>


texts: Display attribute value as a Product Tab label in Magento 2

texts:
I added a new product Tab which displays the custom attribute value.
app/code/Vendor/Module/view/frontend/layout/catalog_product_view.xml
<referenceBlock name="product.info.details">
        <block class="Vendor\Module\Block\Product\Index" name="custom.tab"
               template="Vendor_Module::product/view/custom.phtml" group="detailed_info">
            <action method="setTitle">
                <argument translate="true" name="title" xsi:type="string">My Example Tab</argument>
            </action>
        </block>
    </referenceBlock>

app/code/Vendor/Module/view/frontend/templates/product/view/custom.phtml
<?php $attribute = $block->getProduct();
  echo  $attribute->getMyattribute();
?>

I created a attribute called "my_attribute" whatever value is entered for the attribute in the product, That is getting displayed here.
Can we display the attribute value as Tab Label?
Currently the tab name is getting displayed as "My Example Tab" as we set the title in layout file.

                    My Example Tab

I am looking for the code where we can display the attribute value as a Tab label. Can someone help me in this..


texts: Simple product description in magento 1.9

texts:
I have a configurable product and 3 simple products associated to it.
As each simple product has a different description and a different colour swatch. When you click on the swatch the image and the sku change which is fine.
However, how do you get the simple product decription and short description to change from whatever is in the configurable product?


texts: *Not browse images* WYSIWYG editor not showing images properly

texts:
This is my first time posting here, but I am having a problem that not a lot of people seem to be having, I have only found one image of my problem on google.

So, after updating from magento 1.9.2.4 to 1.9.3.2, WYSIWYG is not showing images properly in backend.

Note: I have replaced my website name and admin URL with "xxxxx".

Also images inserted from other websites such as imgur . com work fine, only the ones from my website are broken.

P.S: I am also having issues with the flash uploader being removed, but I have fixed that by using a HTML 5 uploader, so that should be unrelated to this issue.

P.S 2: The images only appear broken in the editor, they are properly displayed on the frontend.

Firefox console shows this:


texts: PHTML template not loading on localhost, does on live server

texts:
I have a strange issue with a .phtml file that is loaded through a static block onto the homepage (Magento 1.8). Today I made a copy of the live shop to my localhost. Everything is set up as it should be and the shop is running smoothly, except for one particular part of it.

On the homepage, and subsequently, on every category page I have developed a category grid that automatically loads all categories that are a child of the active category. On the live site this is working as it should be. However, running the shop locally gives some problems when rendering the grid. In fact, it is not rendered at all. If I substitute the code with some simple HTML of even PHP all is well and the homepage is build up correctly. I've also tried deleting parts of the code to see where it fails but it seems that there are several instances of code that breaks the page.

Does anyone have any experience with this kind of behavior? A .phtml template that does render on a live server but breaks on localhost environment? Other static blocks that load .phtml template files into the shop are working just fine.


texts: Magento 1.9 404 Error in Magento Connect Manager

texts:
I have been having some issues with my magento connect manager. I feel like i have tried everything so I am reaching out for some help. Things I have tried...

Resetting Permissions in the folder and file
Took a folder from a fresh magento download and replaced it.
Clear cache, log out log back in.

I'm not even sure when it happened.

I'm thinking it could be my .htaccess maybe?

When I try to access it from the backend it redirects and gives me a 404 error on the front end and has this in the url.   /extension_local/index/key/0f705abce4703672f731b6f12f42681d/

If someone could help or have any suggestions I would appreciate it!


texts: Products displayed with $0.0, with no name and No image

texts:
I created a extension for displaying Most viewed products in home page. I am able to see the products but there is no name or image and the price is displayed as $0.0. I am not able to figure out the reason for why the products are displayed in this way.

Please help me

Code in Block file:

parent::__construct();
        $storeId    = Mage::app()->getStore()->getId();
        $products = Mage::getResourceModel('reports/product_collection')
            ->addOrderedQty()
            ->addAttributeToSelect('*')
            ->addAttributeToSelect(array('name', 'price', 'small_image'))
            ->setStoreId($storeId)
            ->addStoreFilter($storeId)
            ->addViewsCount();

        if(Mage::getStoreConfig('catalogextensions/config3/max_product'))
        {
            $products->setPageSize(Mage::getStoreConfig('catalogextensions/config3/max_product'));
        }

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

        $this->_productCollection = $products;
        //var_dump($products);

//die();
            return $this->_productCollection;

Code in phtml file:

<?php echo $this->getLayout()->createBlock('catalogextensions/mostviewed_home_list')->setTemplate('catalog/product/list.phtml')->toHtml(); ?>


texts:
I'm working on one module. module does read CSV file from var/import and making a call to Magmi to import.

  RunQuickImport.php

namespace Test\Import\Controller\Adminhtml\Customimport;
class RunQuickImport extends \Magento\Backend\App\Action
{
public function execute()
    {
    $csv_data =readcsv file ;
    foreach($csv_data as $row){
       $dp = Magmi_DataPumpFactory::getDataPumpInstance("productimport");
       $dp->beginImportSession("default", "xcreate");
       $item = "product field array";
       $run = $dp->ingest($item);
       $dp->endImportSession();
         }
     }
}

Question is How to include Magmi file in controller ?

I had tried using following.

require_once '/public_html/magmi/inc/magmi_defs.php';
require_once '/public_html/magmi/integration/inc/magmi_datapump.php';

but not working


texts: Magento 2: how to add child block in topnav

texts:
How to add child block to catalog.topnav in magento2. in magento 1 we can do that like.

<reference name="catalog.topnav">
    <block type="core/template" name="main-menu" template="html/custommenu.phtml"/>
</reference>

any help will be appreciated.


texts: Is it possible to create an admin route that doesn't need the admin "key" in the URL?

texts:
I created a new admin route and hooked it up to one of the admin menus for testing. When I click the menu link I go to a URL like this:

http://localhost/magento/index.php/myroute/adminhtml_index/index/key/4dee0c78dec3bc0ff3cf3f3166970602/

Is it possible to create an admin URL/route that doesn't require that key in the URL?


texts: Adding Google Web Font to Transactional Email?

texts:
I'm attempting to add a Google Web Font (Montserrat: https://fonts.google.com/specimen/Montserrat?preview.text_type=custom) in the Marketing -> Email Templates area and attempted to add this in two ways.
I added the <link .. /> element in the <header> and also tried adding an @import rule in the box that allows you to add styles in the Email Template section of the admin panel.
Am I doing this wrong? The font is not showing on my sales emails. Thank you.


texts: Trying to create a Multidomain Multistore setup

texts:
I have installed Magento 2.0.9

I am attempting to create following store configuration

Website            Store             StoreView   BaseUrl   Storecode
-----------------------------------------------------------------------
Main Website   Main Website Store    Portuguese  domain1.com   dp1
Main Website   Main Website Store    English     domain1.com   de1
Main Website   Fashion Store         Portuguese  domain2.com   dp2
Main Website   Fashion Store         English     domain2.com   de2
-----------------------------------------------------------------------

domain1.com contains all products: Books, jewelry, clothing etc. I have created a Fashion store with just jewelry category products and I am able to view domain2.com successfully.

The problem is when I change the storeview of both the domain1.com or domain2.com from Portuguese to English/English to Portuguese there is no effect. However I am to access the page by the urls directly : domain2.com/de2 and domain2.com/dp2 they work.

Can any tell me or suggest what should I do to get the store switching to work?


texts: moving a product from default category to correct category

texts: If a product is incorrectly assigned to a category - in my case, to the default, how does one change the product to the correct category? I want to move a product that is now in "default" to "earrings"


texts: How to get admin session(user) details on front side in Magento 2?

texts:
In order to restrict front side access for some admin user i need currently logged in admin user details at front side.

I have tried to get the admin session details as per below but not getting details.

Variable: protected $_adminSession;

Model: Magento\Backend\Model\Auth\Session $adminSession

Function:

$this->_adminSession->hasUser() ? (int)$this->_adminSession->getUser()->getId() : null;

Above call gives me blank value.

If someone have idea regarding the same please share here.


texts: Magento 2: How to rename "add to cart" text on catalog page only

texts:
I'd like to rename the "Add to cart" button to "View now" on the catalog page and homepage only. However on the product view it should still state "Add to cart".

Which js files do I have to edit in order to achieve that?


texts: Activated Captcha in Admin but it is not visible on frontend

texts:
https://sciencellonline.com/customer/account/create/

When I try to register for an account, the captcha is not visible and gives an error saying "incorrect Captcha".

I deleted the captacha.xml and Captacha folder from RWD theme and copied them into custom and base folder. still no go.


texts:
[ERROR] exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`m2mar1317`.`cms_page`, CONSTRAINT `CMS_PAGE_PAGE_ID_SEQUENCE_CMS_PAGE_SEQUENCE_VALUE` FOREIGN KEY (`page_id`) REFERENCES `sequence_cms_page` (`sequence_value`) ON DELETE CASCADE)

How to fix this issue?

Attached screenshot:


texts:
I added my mini cart to the header and now I have a nice popup that shows the list of items inside my cart. I can see how many items I have of each on my cart but I want the user to be able to change that quantity. What is the best way to achieve this?

This is the part that's getting the content of the mini cart:

<?php $_items = $this->getRecentItems() ?>
    <?php if(count($_items)): ?>

                <?php foreach($_items as $_item): ?>
                    <?php echo $this->getItemHtml($_item) ?>
                <?php endforeach; ?>

                <a class="view_all" href="<?php echo $this->getUrl('checkout/cart')?>"><?php echo ($_cartQty > 3) ? $this->__('View All Items'): $this->__('View Cart');?>
                <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button checkout" onclick="window.location='<?php echo $this->getUrl('checkout/onepage')?>';"><?php echo $this->__('Checkout') ?></button>

    <?php else: ?>

<?php echo $this->__('You have no items in your shopping cart.') ?>

    <?php endif ?>

And on the php file I have this (among other functions):

public function getRecentItems($count = null)
    {
        if ($count === null) {
            $count = $this->getItemCount();
        }

        $items = array();
        if (!$this->getSummaryCount()) {
            return $items;
        }

        $i = 0;
        $allItems = array_reverse($this->getItems());
        foreach ($allItems as $item) {
            /* @var $item Mage_Sales_Model_Quote_Item */
            if (!$item->getProduct()->isVisibleInSiteVisibility()) {
                $productId = $item->getProduct()->getId();
                $products  = Mage::getResourceSingleton('catalog/url')
                    ->getRewriteByProductStore(array($productId => $item->getStoreId()));
                if (!isset($products[$productId])) {
                    continue;
                }
                $urlDataObject = new Varien_Object($products[$productId]);
                $item->getProduct()->setUrlDataObject($urlDataObject);
            }

            $items[] = $item;
            if (++$i == $count) {
                break;
            }
        }

        return $items;
    }

Right now this gives me this: item - qty - remove button - edit button And I want to replace the edit button with input to change the quantity of the items


texts: Installing the RWD theme into Magento 1.7

texts:
I'm pretty new to Magento so have a feeling I'm making an extremely rookie mistake.

Basically, as a favour for my boss I'm trying to put a reskinned version of the basic RWD theme that comes with Magento onto our website.

I did the reskin, plucked it onto an old website I have for experimentation (http://www.hauntedcontraption.com.au/) and confirmed that it all works.

Copied the files across to their server (http://idsupplies.com.au/c50.com.au/) and no matter what I do, the menu seems broken.

I can see a strange ' ]> ' text output at the top of the c50 page, this output vanishes when I revert to the default theme on the site. I can't figure out where it's coming from as page.xml all appears intact and it's exactly the same file I'm using on the site that works...

I do note that my server (hauntedcontraption) uses Magento 1.9.2.3 and work's version of Magento are different (work is using 1.7.0.2).

Is there anything stupidly obvious you guys can see that I'm missing?
Is there enough of a difference between 1.9 and 1.7 that the menu in RWD theme won't work?


texts: Magento2 Enterprise Search what’s changed?

texts:
I am trying to find what Enterprise features we have out of the box in Magento 2. I do apologize for a broad question but it’s really hard to find information about this topic now, so hope community can help, share experience.

What search improvements we have comparing to the first version?
What new functionality and out of the box features available for search result tuning?
Is it easier to customize Enterprise search (add CMS search for example) ?


texts: Reason for using underscores in private / protected properties?

texts:
Often I'll be going through tutorials written by various people, and see underscores used for private or protected vars/properties within a class.

e.g., one person will will have:

protected $_storeManager;

public function __construct(
    \Magento\Store\Model\StoreManagerInterface $_storeManager
)
{
    $this->_storeManager = $_storeManager;
}

and another tutorial will have:

protected $_storeManager;

public function __construct(
    \Magento\Framework\App\Helper\Context $context,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    ) {
   parent::__construct($context);
    $this->_storeManager = $storeManager;
}

And yet another will have

protected $storeManager;

public function __construct(
  \Magento\Framework\App\Action\Context $context,
  \Magento\Store\Model\StoreManagerInterface $storeManager,
) {
  parent::__construct($context);
  $this->storeManager = $storeManager;
}

Is there any rhyme or reason for this? Is there a reason you would ever use a _ for a protected or private class property? Magento docs say they follow PSR-2 standards, which states

  "Property names SHOULD NOT be prefixed with a single underscore to indicate
  protected or private visibility."


texts: How can I change add to cart button on category page to saw view more and route to product page?

texts: Instead of adding an item to the cart from the category page I would like to instead have it simply route to the product page.


texts: Shopping Cart Price Rules, is such condition possible?

texts:
I am trying to setup a discount that gives:

20 USD off for orders over 100 USD
40 USD off for orders over 200 USD
etc.

The issue:

One category has items for $2-4 each

Is there any way to setup price rules so the cheap items from specific categories are not calculated into the amount?

The best I could think of: exclude discount if category matches X, but that just removes discount completely if user adds any cheap items.

Is there a better way?


texts: how to copy composer install modules of vendor from one project to another project magento 2

texts:
Is it possible copy composer install modules of vendor from one
project to another project magento 2 without composer commands.
If anyone having any idea please guide. I knew that it's not good
practice but i don't have more ideas on it.


texts:
We have migrated data from M1 to M2.3.1 EE successfully but facing an issue below when open orders grid at magento2 admin end.

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

Followed below reference links but no luck can anyone suggest me on this.

Magento2 Error: "Something went wrong with processing the default view and we have restored the filter to its original state" showing on the loop

How to solve admin grid error?

Sales Order Grid is empty after data migration process

http://www.degtil.com/2017/05/03/magento-2-fixing-a-faulty-grid-filter-something-went-wron


texts: Magento 2.2.0 partial Credit Memo/Refund doesn't work properly

texts:
We have to try partial credit memo for Magento 2.2.0 shop admin for below step:

1) Proceed order with default payment and Grand Total are €37.00

2) Create the Invoice.

3) Try to Credit memo with Adjustment Fee are €10.00

After refund, Order status set Closed status.

  Order History:

  Order Total:

And Credit memo button are not available in order history.

How to fix this issue....!


texts: How do I fix "Payment profile is invalid: Trial billing amount is wrong." when trying to check out with recurring profile with free trial period?

texts:
I set up a daily (for testing) recurring profile, with a free trial period of 3 days, using the following settings:

Then I test (my store is connected to PayPal in sandbox mode) as a user, add the product to my cart, my total is $0 as expected, with daily subscription fully described, but when I click "Proceed to Checkout", the cart page refreshes with a red error box above my cart items that says, "Payment profile is invalid: Trial billing amount is wrong." Am I setting something wrong?


texts: Why when I remove some referenceBlock are shown javascript errors in Magento 2?

texts:
I needed to set display='false' in some referenceBlock from my Home Page:

Now when display Home Page are shown javascript errors:

Any suggestions?

Thank's.


texts: Magento2.2.5 make root.phtml load from child theme folder

texts:
I am developing a custom "child" theme based off Luma and wondering how I might add a custom root.phtml .
I have copied the entire contents of the vendor/theme-frontend-luma to my
app/design/frontend/ folder now I also in the app/design/frontend/ have a child theme folder created. My issue is no matter what it always seems to load the root.phtml from the app/design/frontend/ folder and not the app/design/frontend// when I am viewing the child theme.

Does Magento2 not allow the root.phtml to be loaded from a child theme?I am trying to add additional links to css, and js files that are unique per store view/child them because this is a multi-site that uses different child themes for different store views.


texts: How can I set my logo like jet.com before loading images


texts: magento : Failed to load resource: the server responded with a status of 404 (Not Found)

texts:
when i press f12 and see console i am getting above error

this is the site :

i want to know what actually happening.

please help me to find solution.

thanks in advance


texts: Magento 2 : Set Dynamic User Define Time for Run cronjob?

texts:
We are developing one Extension in which we provide the facility to the user to set his custom time for run corn job.
for this functionality, we provide fields in-store configuration like:

Custom Schedule: {*/5 * * * *}

Or

Frequency: {Monthly/Weekly/Daily}
Start On: {00:00:59}(time to start)

and set this dynamic value into crontab => config -> group -> job -> shedule
How can we set this functionality in our Extension?
Which is the Better way for implementing this functionality?


texts: magento2: How to remove zipcode from billing address in checkout process

texts:
I want to remove zipcode and Street Address field from billing address from checkout process.

I am able to remove the above field from shipping address successfully using this article

Please help me how to remove these field from billing address.


texts: How Do we can give dynamic data for a form field in admin form(ui-component) in magento 2

texts:
I need to add note to the form field using notice tag. for example

 <notice translate="true">Image size should be equal to some(here I
 need to pass dynamic value)</notice>

form.xml

 <field name="image" sortOrder="60" formElement="fileUploader">
            <settings>
                <notice translate="true">Image size should be equal to some(here I need to pass dynamic value)</notice>
                <label translate="true">Image</label>
                <componentType>fileUploader</componentType>
                <visible>true</visible>
            </settings>
            <formElements>
                <fileUploader>
                    <settings>
                        <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                        <maxFileSize>102400</maxFileSize>
                        <uploaderConfig>
                            <param xsi:type="string" name="url">a/b/c</param>
                        </uploaderConfig>
                        <previewTmpl>x_y/image-preview</previewTmpl>
                    </settings>
                </fileUploader>
            </formElements>
        </field>


texts: Getting 500 Internal server error while installing theme

texts:
I had bought a theme from themeforest. basic installation works fine i can login to admin panel and do changes, but while adding theme i am getting 500 internal server error

ThemeForest Link

System Log

[2018-11-01 08:45:02] main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 340000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []


texts: Show Different Number of Products Per Row

texts:
How to show three products in one row of products grid and two products in alternative rows.

It is similar to this question https://stackoverflow.com/questions/8460773/different-number-of-products-per-row-in-magento

Any help would be appreciated.


texts: Magento product import using magmi Base Image, Small image and Thumbnail fields not selected

texts: I have imported products, categories and images successfully using Magmi but Base Image, Small Image and Thumbnail attributes of the image are not getting selected.


texts: Want to move magento 2.3 from localhost to live server

texts:
Please guide me how to move magento 2.3 from localhost to live server.
Require step by step guide.

Please help!! Having problem in phpmyadmin while exporting the magento sql.


texts:
I have added 2 new input fields in one of my payment methods in the template. Here's the code:

<input type="text" id="swiftcode" name="payment[debit_swift]" title="<?php echo $this->__('SWIFT Code') ?>" class="input-text" value="<?php echo $this->getAccountSwift() ?>" />

and

<input type="text" id="iban" name="payment[debit_iban]" title="<?php echo $this->__('IBAN') ?>" class="input-text" value="<?php echo $this->getAccountIban() ?>" />

I in the DB table sales_flat_order_payment the column name for the 2 attributes is debit_swift and debit_iban.

So, so when I tried to show the information in the order details in the back-end, I couldn't. I have added the text, but I do not get the information that has been saved in the order:

<?php echo $this->__('BIC (Swift-code): ', $this->htmlEscape($_info->getAccountSwift())) ?>

<?php echo $this->__('IBAN: ', $this->htmlEscape($_info->getAccountIban())) ?>

I use $_info->getAccount...() because for the other attributes (that are input fields in the front-end and are shown in the order details in the back-end) is used the same way of acquiring the information.

Any suggestions on that how to show the information in the back-end order details?

EDIT: this is the whole code of the template.

<?php if ($_info = $this->getMethod()): ?>
    <?php echo $this->htmlEscape($_info->getTitle()) ?>

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

        <?php if ($this->sendDataInEmail()): ?>
            <?php $_data = $this->getEmailData() ?>
            <?php if (!empty($_data['bank_name'])): ?>
                <?php echo $this->__('Bank name: %s', $this->htmlEscape($_data['bank_name'])) ?>

            <?php endif; ?>

            <?php echo $this->__('Bank code: %s', $this->htmlEscape($_data['account_blz'])) ?>

            <?php echo $this->__('Account holder: %s', $this->htmlEscape($_data['account_name'])) ?>

            <?php echo $this->__('Account number: %s', $this->htmlEscape($_data['account_number'])) ?>

            <?php echo $this->__('BIC (Swift-code): ', $this->htmlEscape($_data['swift'])) ?>

            <?php echo $this->__('IBAN: ', $this->htmlEscape($_data['iban'])) ?>

        <?php endif; ?>

    <?php else: ?>

        <?php if ($_info->getAccountBankname() == Mage::helper('debit')->__('not available')): ?>
            <?php echo $this->__('Fehler! Die eingegebenen Bankdaten können fehlerhaft sein!
Bitte setzen Sie sich mit dem Kunden in Verbindung!') ?>

        <?php else: ?>
            <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getAccountBankname())) ?>

        <?php endif; ?>
        <?php echo $this->__('Account holder: %s', $this->htmlEscape($_info->getAccountName())) ?>

        <?php echo $this->__('Account number: %s', $this->htmlEscape($_info->getAccountNumber())) ?>

        <?php echo $this->__('Bank code: %s', $this->htmlEscape($_info->getAccountBLZ())) ?>

        <?php echo $this->__('Customer number: %s', $this->htmlEscape($_info->getInfoInstance()->getKundennummer())) ?>

        <?php echo $this->__('BIC (Swift-code): ', $this->htmlEscape($_info->getAccountSwift())) ?>

        <?php echo $this->__('IBAN: ', $this->htmlEscape($_info->getAccountIban())) ?>

        ?>
    <?php endif; ?>

<?php endif; ?>


texts:
My website was initially http later I have updated it to https.
some of the Urls when hit as http://www.testsite.com/testfile.php?id=3456  it will redirected to the home page of the site with 302.
Even when the https version of that url is exist.
All other Urls are working fine.


texts: Smart One Page Checkout Breaks Credit Card Processor

texts:
I'm using AheadWorks Smart One Page Checkout for Magento 2 and for some reason it completely breaks my authorize.net credit card processing.

I receive this error in the payment.log

'response' => '{"transactionResponse":{"SupplementalDataQualificationIndicator":0},"messages":{"resultCode":"Error","message":[{"code":"E00076","text":"dataDescriptor contains invalid value."},{"code":"E00076","text":"dataValue contains invalid value."}]}}',

That's an authorize.net error code, but the only detail they give on their error code lists is that an invalid value was given. When you're actually checking out, the only error displayed is a regular "Credit Card Declined" message.  The credit card section also has a display error that may or may not be related to the error code.

Here is a screenshot with the display error marked with an arrow.

I cannot tell whether this display error is causing the invalid submission or not. Authorize.net credit card processing works perfectly fine the second I disable One Page checkout, and the error occurs even on a brand new clean Magento 2.3.1 installation.

I've tried all I can think of and am looking for any ideas on potential solutions.

Thanks in advance.


texts:
I have this line:

$collection->getSelect()->join(
  'sales_flat_order_address',
  'main_table.entity_id = sales_flat_order_address.parent_id',
  array('telephone','city','postcode','country_id' )
)
->where("sales_flat_order_address.address_type =  'billing'");

The problem is that it works partially with joinLeft and "the other part" works with joinRight but if I use join it returns nothing(0 results).

And I'm showing the data like this:

$this->addColumn('telephone', array(
            'header' => Mage::helper('sales')->__('Telephone'),
            'index' => 'telephone',
            'filter_index' => 'sales_flat_order_address.telephone',
        ));

Magento version is 1.9.

The actual query:

SELECT
  `main_table`.*,
  `sales_flat_order_address`.`telephone`,
  `sales_flat_order_address`.`city`,
  `sales_flat_order_address`.`postcode`
FROM
  `sales_flat_invoice_grid` AS `main_table`
RIGHT JOIN
  `sales_flat_order_address`
ON
  main_table.entity_id = sales_flat_order_address.parent_id
WHERE
  (sales_flat_order_address.address_type = 'billing')

In this case it returns the proper data but the "LEFT" field are empty, because I'm using RIGHT JOIN I guess.


texts: How to create new quote programmatically from old order after place the order in magento 2

texts:
I want to create a new quote based on the old order. I can create order programmatically but not able to just add to cart product in a new quote.
I don't want to place the order. Need is only add to cart product programmatically.


texts: Magento Integrity constraint violation: 1062

texts:
Currently i'm facing below error when i'm save any product on admin side. When ever i import new product or try to create new product and save it in admin. It's show error again and again . please help and post your suggestion

Error:-

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '186899-0-2' for key 'PRIMARY', query was: INSERT INTO `catalog_product_index_price_tmp` SELECT `catalog_product_index_price_final_tmp`.`entity_id`, `catalog_product_index_price_final_tmp`.`customer_group_id`, `catalog_product_index_price_final_tmp`.`website_id`, `catalog_product_index_price_final_tmp`.`tax_class_id`, `catalog_product_index_price_final_tmp`.`orig_price` AS `price`, `catalog_product_index_price_final_tmp`.`price` AS `final_price`, `catalog_product_index_price_final_tmp`.`min_price`, `catalog_product_index_price_final_tmp`.`max_price`, `catalog_product_index_price_final_tmp`.`tier_price`, `catalog_product_index_price_final_tmp`.`group_price` FROM `catalog_product_index_price_final_tmp`

catalog_product_index_price_final_tmp Table Structure:-

catalog_product_index_price_tmp Table Structure:-


texts: Free shipping issue and Country Shipping Issue

texts:
I have an issue with Free shipping. I set up free shipping over 29 euro only for orders coming from Italy. Following issue:

If I change the amount to reach to get free shipping, let’s say Free shipping over 19 euro or I remove the special offer, changes it doesn’t get effected; you can keep having free shipping over 29 euro.

I set up Free shipping for all orders coming from Italy but it seems that it also applied to other countries. I've selected Italy in countries list.

I've setup countries to which we deliver, but the cart is allowing all countries.

check the screen shot. I set up everything correct just like you suggested but it still doesn't work out.

What should i do?


texts: Create a script to update the SKU and set SKU using CSV

texts: How To Create a script For Update Product SKU Using Custom Script.


texts: dynamic mail subject not working in Magento 2

texts:
I am trying to set the dynamic mail subject, but it is not working.

I tried below ways.

1     {{ var sku }}

But not working above ways.

{{template config_path="design/email/header_template"}}

{{trans "Hello"}}, {{trans "Admin"}}

                                                     {{var message}}

                                    &nbsp;

                                            {{trans "Thank you"}}

 {{template config_path="design/email/footer_template"}}

Any help on this will appreciate?


texts:
I am using the Optimiseweb Cookie Notice module: http://www.magentocommerce.com/magento-connect/cookie-law-compliance-eu-uk-implied-consent-16757.html

I would need to disable the cache for the .phtml template. Here is the XML that takes care of loading the template file (as far as I understood):

<layout version="0.1.0">
    <default>

        <reference name="head">
            <action method="addCss" ifconfig="optimisewebcookienotice/general/enabled">
                <stylesheet>css/cookienotice.css</stylesheet>
            </action>
        </reference>

        <reference name="before_body_end">
            <block type="cookienotice/notice" name="optimiseweb_cookienotice" as="OptimisewebCookienotice" template="optimiseweb/cookienotice/cookienotice.phtml" />
        </reference>

    </default>
</layout>

Edit: After the below comments, here is what I have now:

<layout version="0.1.0">

    <default>

        <reference name="optimiseweb_cookienotice">
            <action method="setCacheLifetime">
                <s>null</s>
            </action>
        </reference>

        <reference name="head">
            <action method="addCss" ifconfig="optimisewebcookienotice/general/enabled">
                <stylesheet>css/cookienotice.css</stylesheet>
            </action>
        </reference>

        <reference name="before_body_end">
            <block type="cookienotice/notice" name="optimiseweb_cookienotice" as="OptimisewebCookienotice" template="optimiseweb/cookienotice/cookienotice.phtml" />
        </reference>

    </default>

</layout>

Is there a way that I can force the template to be not cached?

I have tried to change the cache lifetime in the block contruct function like below but that did not work:

protected function _construct() {

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

Thanks in advance for any help on this!


texts:
I tried to add a 'span' with the total quantity in cart but I have a small problem, I would like to add the red circle with quantity only if there is a product in cart. It works but when we go on another page, the red circle appears and disapears few seconds after.
Do you how I can solve this problem?

Here is my code in minicart.phtml

<a class="action showcart" href="<?php echo $block->getShoppingCartUrl(); ?>"
   data-bind="scope: 'minicart_content'">
    <?php echo __('My Cart'); ?>

one second after

Thanks


texts: How to add style(css,js) to custom widget

texts:
Hi i can try to add style to widget in the usual way.
like here https://webkul.com/blog/magento2-how-to-add-css-and-js-file-in-module/

its not working.

How can i add to css file to widget?


texts: Extending the complexType named "imageType" with a custom image type

texts:
The goal of a module I'm currently developing is to add a custom image type called "opengraph_image". I added a new EAV attribute though my InstallData.php script which works fine. When I now login into the Magento2 backend and alter a product I can choose the image type "opengraph_image" while uploading or editing product images.

However, on the frontend I would like to display this image. Therefore I created a etc/view.xml file in my module with the following content:

<?xml version="1.0"?>
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Esites_SEO:etc/custom.xsd">
    <media>
        <images module="Magento_Catalog">
            <image id="opengraph_image" type="opengraph_image">
                <width>265</width>
                <height>265</height>
            </image>
        </images>
    </media>
</view>

But now I get the following error:

Invalid XML in file /var/www/html/vhosts/magento2/app/code/Esites/SEO/etc/view.xml:
Element 'image', attribute 'type': [facet 'enumeration'] The value 'opengraph_image' is not an element of the set {'thumbnail', 'small_image', 'image', 'swatch_image', 'swatch_thumb'}.
Line: 5

Element 'image', attribute 'type': 'opengraph_image' is not a valid value of the local atomic type.
Line: 5

The reason is it doesn't seem to load my custom.xsd located in: app/code/Esites/SEO/etc/custom.xsd where I define the opengraph_image. Instead it seems to just load it's default XSD file: vendor/magento/framework/Config/etc/view.xsd

The content of my custom.xsd is a copy (for testing purposes) of this original view.xsd where I added the following on line 75:

 <xs:enumeration value="opengraph_image"/>

The frontend does work without errors if I include the line above in the original view.xsd file. I followed the documentation on: http://devdocs.magento.com/guides/v2.0/extension-dev-guide/build/XSD-XML-validation.html and my paths are build according to the information on that page. Cache is cleared multiple times.

What am I missing?


texts: Tax not showing in shopping cart in Magento 2

texts:
We have setup all our tax classes and tax settings in Magento 2 and everything is working perfect, only in the shopping cart the tax is not calculated in the grand total. In the rest of the checkout proces and in orders it does show up. We have setup "display prices" to yes and I included down here a printscreen with the settings:

Does anyone have an idea why the tax is not showing up in the cart?


texts:
I need to create FANCYBOX gallery like here: example link

Please give me documentation link where described such example and link for downloading according version.


texts: Magento2: Get Bundle product Id in overridden function

texts:
I have overridden getValue() function of Magento\Catalog\Pricing\Price\FinalPrice

So how can i get the bundle product Id in this function.
When I try to get the bundle product id it giving me the simple product id of that bundle product.

Note : I have tried getParentIdsByChild() but it giving all the parent ids instead of current parent Id


texts: Does Magento support Parenthesis symbols / Brackets in picture filename?

texts:
0 down vote favorite

Easy step: Can anyone who uses magento try to import a picture with brackets included in the picture name? Use the default import/export tool and please let me know if you have success.

I just installed Magento 1.81 and have about 2000 products with pictures with file names formatted: Product name + (#)

For example:

3.5mm-in-car-handsfree-fm-transmitter-iphone-3g-3gs-4-4s(1).jpg

I want to upload the pictures with Magento default import/export.

I can't upload the pictures with ( ) symbols - the picture will not be visible/appear.

Other pictures display correctly. I come from Opencart where the symbols ( ) are supported on product pictures.

My settings:

Magento 1.81
nginx/1.6.0 on VPS server
PHP 5.3.28


texts: Check the existence of a column in customer eav table

texts:
I write a code to create a sql file to add a column to customer eav table. I want to check whether that field exist in customer table or not.

here is my code for creating that field >>

$setup = Mage::getModel('customer/entity_setup', 'core_setup');
$setup->addAttribute('customer', 'nationalcode', array(
    'type' => 'varchar',
    'input' => 'text',
    'label' => 'national code',
    'global' => 1,
    'visible' => 1,
    'required' => 0,
    'default' => '',
    'user_defined' => 1,
    'visible_on_front' => 1,
));

what should I add to this code to check the existence of the "nationalcode" field before creating it?


texts: Magento 2: How to set meta tag in controller?

texts:
In magento1 we use this code to set meta description and meta keywords.

$this->getLayout()->getBlock('head')->setDescription('test description');
$this->getLayout()->getBlock('head')->setKeywords('test keywords');

I know this will do that in blocks

$this->pageConfig->setDescription('test description');
$this->pageConfig->setKeywords('test keywords');

What is controller code replacement in Magento2.


texts:
I have configured magento with only catalogus price rules, no shopping cart price rules exist.

The catalogus price rules define different percentage discount for different categories, for different user groups. All price rules say 'stop further processing'.

Now I have a conflict in the price calculations in shopping cart when adding multiple products.

For example:

I add a product (1) which has catalog price rule A, price is fine
I add a product (2) which has catalog price rule B, price is wrong. The discount from catalog price rule A is applied (because product (1) has price rule A).
When I remove product (1) from shopping cart, the price for product (2) is adjusted to the correct price
Demonstrated in the following screenshots: http://www.phpworks.nl/magento-catalog-price-rules.png

Now my question is: is this behaviour a bug in magento ? Catalog price rules should be calculated per product, not per shopping cart, if im right ?


texts: How is ownership of generated files determined in Magento?

texts:
Since I started working with Magento 2 I have had consistent problems with permissions, usually with the var/cache directory. Typically when I clear cache using the command line I start running into problems (for example, errors accessing the cache sub dirs because it's owner/group is wrong).

My question is, how is the user of generated files (such as cache) determined? What steps should be taken to prevent ever having permission issues?


texts: FishPig Attribute Splash Pages Extension Bugs

texts:
I'm evaluating the FishPig Attribute Splash Pages extension for a client, and I've run into a few bugs.  I've got support requests into the extension vendor, but since it's a free extension I figured I'd throw them out to the community as well in case any of you have fixes/workaround/insights.  This is for the recently released 2.2.0 version of the extension.

Bonus question: The reviews mention a FishPig GitHub account — does anyone know the account name on this?  The obvious candidate doesn't have any repositories.

Pagination

Pagination appears to be broken

The above image is a 2 item list, with the "per page" set to 1.  The pager HTML is correct, but the entire list is output on each page.  This appears to be caused by an early call to count on the collection.

Does anyone have a fix/workaround.insight on this?

Group Page Display Mode

On the Groups editing form, there's a Drop Down labeled Display Mode that allows you to select

Products Only
Static Block Only
Static Block and Product

However, this field doesn't save.  The values in HTML for this field are strings (PRODUCT, PRODUCT_AND_BLOCK, etc), but the database column in a tinyint.  Also, the group page template and view block doesn't appear to reference this column for anything.

Does this column drive any behavior?  Is it something left over from a previous version?


texts: How to get the URL shown at address bar?

texts:
The url at address bar is shown as http://domain/index.php/venues/details

Using $this->helper('core/url')->getCurrentUrl();

it returns http://domain/venues/details
'index.php' is missing here

Is anyone aware of any method in magento to get exact same string that is shown in address bar? like $_SERVER['REQUEST_URI']?

If there's no such method.. Is it okay to user $_SERVER variables in Magento?


texts: Cannot get session value in another controller

texts:
I am trying to get the session value in another controller but don't get value from the session:

class Vaibhav_User_IndexController extends Mage_Core_Controller_Front_Action
  {
    public function loginAction()
{
    $data = $this->getRequest()->getParams();
    $model = Mage::getModel('user/user')->load($data['login']['username'],'email');
    if($model->getPassword() == $data['login']['password'])
    {

        if($model->getUserType() == 2)
        {
            Mage::getSingleton('core/session')->setLogiusername($model->getUserId());
            $this->_redirect('user/vendor/index');
            return ;
        }
    }
    else{
        Mage::getSingleton('core/session')->addError('Invalid Email Id or Password.');
        $this->_redirect('*/*/');
        return;
    }
}
}

class Vaibhav_User_VendorController extends Mage_Core_Controller_Front_Action
{
    public function preDispatch()
    {

    }
    public function indexAction()
{
    echo Mage::getSingleton('core/session')->getLogiusername();
    exit;
}
}


texts: cart total percentage discount in magento 1.9

texts: I need to give 20% discount of cart total for all registered users in my store if the user register at the checkout time also get the benefit of discount. For guest checkout no need any discount


texts: In Repository, how to replace deprecated load() function?

texts:
I know we should use service contracts(Repository) over $model->load(), but in Repository itself, how to replace the deprecated load() function?

For example, in Magento\Cms\Model\PageRepository, the official Magento 2.1.9 used the deprecated load() function too.

public function getById($pageId)
{
    $page = $this->pageFactory->create();
    $page->load($pageId);
    if (!$page->getId()) {
        throw new NoSuchEntityException(__('CMS Page with id "%1" does not exist.', $pageId));
    }
    return $page;
}

Reference

When Should We Use a Repository and Factory in Magento 2?

Is there ever a reason to prefer $model->load() over service contracts?


texts: Magento2: change layout if category has no products

texts:
Attempting to change the layout of the category page from 2 columns to 1 column, if the category has no products. I have a working solution for Magento 1, just not sure what approach would be best for Magento 2. Any help is appreciated.

Magento 1 example:

class Empty_category_Model_Observer {

public function zeroproducts(Varien_Event_Observer $observer)
{
    $controller   = $observer->getAction();

    //limit to the product view page
    if ($controller->getFullActionName() != 'catalog_category_view')
    {
        return;
    }

    $_productCollection = $observer->getEvent()
        ->getLayout()->getBlock('product_list')->getLoadedProductCollection();

    $products = clone $_productCollection;

    if(!$products->count()):
        $observer->getEvent()->getLayout()
                 ->getBlock('root')
                 ->setTemplate('page/1column.phtml');
    endif;

}

}


texts: Magento 2 - which folder the installed extension will be

texts:
I have to install the extension in server.
So I tried Web setup Wizard, but I'm facing component dependency readiness issues
So I checked and got a solution like to run the update query in the shell, but I don't have SSH access to run, just I have FTP and backend admin rights only

I planned to install the extension in local and move to server. Is any problem ll occur in this ?
If I tried this way then, where can I see the installed file?

I'm trying the below extension https://marketplace.magento.com/vsourz-imagegallery.html

Or is any other way to install?

Below Check my error while installing.


texts:
I want to have the photo gallery in a tab like some of the other content. I then tried as per below.

In my app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_product_view.xml  I have the following :

<body>
<referenceBlock name="product.info.details">
 <block class="Magento\Catalog\Block\Product\View" name="gallery.tab" as="gallery" template="product/view/photogallery.phtml" group="detailed_info" >
     <arguments>
         <argument translate="true" name="title" xsi:type="string">Gallery</argument>
     </arguments>
 </block>
 <move element="product.info.media" destination="gallery.tab" after="-" />
</referenceBlock>
</body>

then I have in app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/view/photogallery.phtml just one line.

<?php echo $block->getChildHtml();?>

It all displays as I wish (i.e. in a tab, all photo loaded) but throw a javascript error while loading the page.

gallery.js:453      Uncaught TypeError: Cannot read property 'setOptions' of undefined

For configurable product there is an error too though not the same :

gallery.js:487      Uncaught TypeError: Cannot read property 'data' of undefined

Additionally, the refresh of the gallery for configurable+swatch products is then not working neither

Variant

I tried as well to change in the layout file app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_product_view.xml so that it put the Gallery block in the details group directly, it simply does not show any gallery anymore.

<move element="product.info.media" destination="product.info.details" after="-" />
<referenceBlock name="product.info.media" group="detailed_info">
    <arguments>
        <argument translate="true" name="title" xsi:type="string">Gallery</argument>
    </arguments>
</referenceBlock>

How can I safely move the Gallery to a tab?

Edit 2016-10-06 : It appears that the issue comes at the initialization of the fotorama. Where is that triggered?

Edit 2016-10-07 : Now, I figured out that the Javascript error appears if my photogallery tab is NOT the first one. if it is the first one, then no problem.

Further test showed that if the Gallery is nested in a div that has display:none; then it throws me the errors.


texts: Display Out of Stock product and disable Add to Cart button

texts:
I have a store where product quantity are set to 0. I have enabled back orders if qty is 0 for a product, however I would like to disable Add to cart in case product is out of stock. This means Add to cart is only available if qty is 0 and In stock is selected in Product Inventory tab. I tried to change couple of settings in System -> Configuration -> Catalog-> Inventory but unable to enable such rule.

Any one who could help?

Thank you


texts:
I have declared the model, resources in file config.xml, then i try to create necessary files for module. there are 3 files:

app/code/local/MW/SimpleNews/Model/News.php
app/code/local/MW/SimpleNews/Model/Mysql4/News.php
app/code/local/MW/SimpleNews/Model/Mysql4/News/Collection.php

But I don't know how to make these files correspondent with the table.

Please help


texts: Magento 1.9 can not remove product fom quote

texts:
I have some problem with removing product from quote.
I observe "Add to cart" with "checkout_cart_product_add_after" event and there simply do this:
$quote->removeItem($quoteItem->getEntityId())->save();

Problem is if this product is first which is added to cart. Otherwise works fine.
Scenario:
I am on category page chose a product which I want to buy. I click "Add to cart". In this moment I am checking if product can be in cart or must be removed (when product must be removed is depended of some attributes on product). Let me say, that this product shouldn' be in the cart so I am trying to remove it. But I can't. But If I add exacty same product again, it will not be added (it will be removed). I know that because qty of product doesn't increase.
Am I using wrong event? Can I maybe against removing product from cart, prevent product to be added to cart? Can anybody help me with this?
Tnx


texts: Problems connecting to my Magento OAuth1

texts:
I am trying to connect my web application to my Magento OAuth1. The problem is when I try the URL //mydomain/store/oauth/initiate I get a page that says: "This webpage is not found" (Error code: ERR_FILE_NOT_FOUND).

Here is my Apache .htaccess configuration (part of it):

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    RewriteBase /store/

############################################
## uncomment next line to enable light API calls processing

#    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

So what am I doing wrong?

More information can be found here: http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html

About which URL to use.


texts:
How can I config magento 2.1 CE multi store in subdirectories with Shared cart and user manager.

For example:

mysite.com/men
mysite.com/women
mysite.com/kids

and all of these subdirectories have one Shared cart and user manager.


texts: Magento 2: address custom attribute, from Order entity to Account entity

texts:
I've added a custom attribute to checkout:

added column in 'quote' and 'sales_oreder' tables
plugin for Magento\Checkout\Block\Checkout\LayoutProcessor
plugin for Magento\Checkout\Model\ShippingInformationManagement
RequireJS + Magento_Checkout/js/model/shipping-save-processor/default override js file
observer on 'sales_model_service_quote_submit_before' event

All works fine.
The field value is stored in the two tables correctly.

Then, I've added the same custom attribute to customer_address entity:

$this->eavSetup->addAttribute(
AddressMetadataInterface::ENTITY_TYPE_ADDRESS,
self::CUSTOM_ATTRIBUTE_CODE,
[]) .. etc
plugin for Magento\Sales\Model\Order\CustomerManagement
observer (adminhtml) on 'core_layout_render_element' event

All works fine. The field value is stored linked to 'customer_address_entity' in EAV mode.

Now,
what I'm trying to do is to save the field into customer_address entity during Checkout Onepage Success Page, when the customer want to create his/her account.

How can I do this?


texts: Filtering 'reports/product_collection' doesn't seem to work properly anymore

texts:
I'm trying to add filters to a collection as below.

    $collection = Mage::getResourceModel('reports/product_collection')
        ->addOrderedQty()
        ->addAttributeToSelect('*')
        //->addAttributeToFilter('status', 1)   // doesn't work here but works in old example in link
        //->addAttributeToFilter('visibility', 3)    // doesn't work here but works in old example in link
        ->setOrder('ordered_qty', 'desc'); //best sellers on top

I got this code from this old source (2008), but it seems to be no longer working as-is. It seems that the reports/product_collection only includes a limited number of fields, which excludes sku among many others.

Additionally, even though it includes status and visibility,  filtering those attributes doesn't seem to work. e.g. this doesn't work (that's why I commented them out) and the collection will return zero products even though the products I want have those values.

->addAttributeToFilter('status', 1) or ->addAttributeToFilter('visibility', 3)

how can I have it include more fields?


texts: which file I use which function in magento

texts:
I am new to magento. My Question is that how to find which function must use in which phtml. for example how can I find that $this->getProduct() in which phtml files could use.
Thanks


texts: While searching a particular item , it is not listing even though it is available?

texts:
While searching for a particular product,the search function is not working properly.

When we search for an item, the specific item is not shown instead a list of items are shown in which the searched item will be available somewhere


texts: Allowing customers to pay an admin created order?

texts:
I'm wondering if there is an extension or some guidelines on how I might think about allowing for an order to be created in the admin area for a customer and then allow them to log in to their account and see the order needs paying and have them be able to put in their card details and pay the order?

Any tips or advice would be appreciated.


texts:
I have an order which has the grand total that I need to fix because one of my products prices is incorrect, to do that I need to change the order item price and recollect order total, is there a way I can do this programmatically?

Here's how I load my order:

$order = $this->objectManager->create('\Magento\Sales\Model\Order')->load($orderId);


texts:
if we disable a product currently visible on store, this is still visible anywhere on the frontend. No matter how many time we clear the cache.

Also, duplicating a product currently visible on the store, and saving it with the same properties, the duplicate product will not be displayed on the site.


texts:
Is there a way to restrict the quantity in the wishlist to 1 similar to how you can for the cart? I will only ever have one of any item however if the customer clicks add to wishlist multiple times on the item it increases the quantity for that item.

Thanks in advance.


texts:
I'm building my first custom module and I think i'm almost there except there seems te be a small error in my code. I tried to overwrite two files from Magento Core.

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php

and

app/code/core/Mage/Core/Model/Store.php

I created the module folder in app/etc/modules/
With: Vendor_Module.xml

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

I created a directory in app/code/local/Vendor/Module
With:

Block/Price.php

<?php
require_once(Mage::getModuleDir('Block','Mage_Adminhtml').DS.'/Catalog/Product/Helper/Form/Price.php');

class Vendor_Module_Block_Price extends Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price {

/**
 * Override the required function here,
 * e.g. createAction
 */
public function getEscapedValue($index=null)
    {
        $value = $this->getValue();

        if (!is_numeric($value)) {
            return null;
        }

        return number_format($value, 4, null, '');
    }
}

etc/config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Vendor_Module>
        <version>0.0.1</version>
    </Vendor_Module>
</modules>
<global>
    <blocks>
        <Module>
            <class>Atvise_RoundPrices_Block</class>
        </Module>
    </blocks>
    <models>
        <Module>
            <class>Atvise_RoundPrices_Model</class>
        </Module>
    </models>
</global>
</config>

Model/Store.php

<?php
require_once(Mage::getModuleDir('Model','Mage_Core').DS.'Store.php');

class Vendor_Module_Model_Store extends Mage_Core_Model_Store
{
/**
 * Override the required function here,
 * e.g. createAction
 */
public function roundPrice($price)
{
    return round($price, 4);
}
}

Can you guys help me out for the last bit of code or corrections?

Thanks


texts: Which function is triggered filterable attributes for the products on category page Magento 2

texts: Which function is triggered when clicking on any filterable attributes for the products on category page Magento 2?


texts: Unable to migrate customer data (1.9 to 2.0)

texts:
I am able to Migrate my Old Data from Magento v-1.9.2.4 to Magento V-2.1.0 using Default Data Migration Tool.

Followed the steps, ignored the fields and tables of Third-Party modules and everything was pretty smooth.

All of the Orders, Settings, Pages etc. are migrated properly except Customers data.

There are currently 0 customers showing in Magento V-2.1 panel when there are more than 10K customers in reality.

Can someone point me out if I am doing anything wrong? or maybe I ignored a tablename in map file which caused this.


texts: Magento 2 how to change order purchased from store?

texts: I recently installed an split order extension, however, this extension splits the order and sets Purchased from to the default store view. I wanted to know if there is a way to change the store here: