Magento

207

Solutions

13

Articles & Videos

269

Contributors

Magento is an open-source e-commerce platform written in PHP for e-commerce web sites. Magento employs the MySQL/MariaDB relational database management system, the PHP programming language, and elements of the Zend Framework. It applies the conventions of object-oriented programming and model–view–controller architecture. Magento also uses the entity–attribute–value model to store data.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello,

I am on magento and having an issue where the query string is getting stripped.

We had the server running http and decided to move it to https, when we did that the query strings are getting truncated when it redirects.

I tried lots of variations but none worked, most broke the website with too many redirects.

Currently:
http://www.domain.com/?test=1
redirects to
https://www.domain.com

https://domain.com/?test=1
redirects to
https://www.domain.com/?test=1

domain.com/?test=1
redirects to
https://www.domain.com

centos7 server

I am not using any htaccess redirects at this moment, they are all being redirected through the index at the moment.

I am not sure why this is so hard to accomplish for me, I would love any help.

Matt
0
Enroll in June's Course of the Month
LVL 8
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

I have inherited a site that is WP and Magento integrated. I have verified that they are using the same database. I have also verified the wordpress site URL and blog URL are pointing to the WP installation inside PUBLIC_HTML/WP (magento installation).

When I log into magento and browse to the section for WordPress > WP Admin, I am prompted with the username and password of the wordpress admin user. When I enter them and press enter, I get the following error
There was an error logging you into WordPress. Please check your WordPress Admin credentials below and try again

Open in new window


I am able to browse to the wordpress admin page (/WP-admin) and log in with the credentials that give the the above error. So it appears to me that wordpress is ok with this username / password but magento is not.

I do not see any plugins in the wordpress dashboard for Magento.

Please help experts = )
0
When upgrading Magento, is it possible to install 2.4 directly to 1.9.3, or does each upgrade have to be done in sequence? (1.9.4 > 1.9.5 > 2.0 > 2.1 >2.2 >2.3 then 2.4)
0
I inherited a site that is WordPress and Magento integrated. This will be my first time with Magento. Backed up the wordpress database, but I don't see any "mg" tables in the DB.

When companies setup a WP to Magento integration, do they often keep WP and Magento data in separate DBs?
0
I just inherited a megento site that is integrated with WordPress. I am trying to figure out how to remove a section from the main horizontal nav bar (See attached).

I logged into magento and I can see menu options under CATALOG > MANAGE CATEGORIES for everything except blog.

Not sure why they integrated with WP, but I can't seem to edit the menu in WP and I can't find in Magenot where to remove the "BLOG" part of the menu.
how-to-remove-BLOG-from-magento-nav-.pdf
0
Here is my question with supporting screenshots (let me know if you think I’ve overlooked anything obvious):


We have a Magento 2 multisite setup, with categories set up like so

Site categories
Our issue is that when editing some (but not all) of these categories, in different store views, Magento throws the following error and does not save the data:

Error message
In this case, the name of the “Supplements” category was edited in the Chinese store view.  It shows the changed value of the name in this view but refreshing the page show that it is not saved at all.

Editing the same category in the default store view does not result in the same issue

Ensuring that the “Default” checkbox is unchecked for the url key field in the Chinese store view makes no difference

URL Key (store view)

We have tried removing url rewrites for this category (based on the error message and other posts we have reviewed) but this does not help.

We are running M2 Community 2.1.5.

Traced the issue back to a db save error in the url rewrite table:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '90-3' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`store_id`,`entity_type`,`entity_id`,`request_path`,`target_path`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?,

Open in new window

0
can some body point me to  any  API documentation that could be generated using Swagger
0
I'm new to PHP and I'm working with the monster Magento, in my shared ISP environment my header 'Authorization' (used for REST) is getting stripped and being put into $_SERVER['REDIRECT_HTTP_AUTHORIZATION'].
Is there a way to inject the $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] into the headers as 'Authorization:xxxx' ?
0
Hello,

How can it be done that Magento uses a different theme for Pc and mobile device?

Thank you very much.
0
I am getting this error on service apache2 restart

Error: SSLCertificateFile: file '/etc/apache2/ssl/www_example_com.crt' does not exist or is empty

i am trying to configure comodo ssl certificate on ubuntu ec2 instance with lamp and i have performed all official steps by following below links.

https://help.ubuntu.com/community/ApacheMySQLPHP https://help.ubuntu.com/14.04/serverguide/httpd.html#https-configuration

please help...,
0
Announcing the Most Valuable Experts of 2016
LVL 6
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Hello Experts,

Is there anyway I can add bootstrap to my magento2  store so I can have a good looking ecommerce website?

Thanks
0
I want to remove the decimal in price both in Front End and Admin Panel.

Is there something like an ET Currency Manager extension for Magento 2.1.3 (because that extension is only compatible up to 1.9.3) or other ways to remove it?
0
Hello,
I do have magento 2 with default Luma theme, how can I hide quantity (product page, cart and summary page in checkout)

E.g. http://www.nasstaging.com/mohinish/meet-assist-arrival-kuwait-international-airport.html

regards,
Kettaneh
0
I want to remove the decimal in the standard number of the bundle product I created in Magento 1.9.3

Capture.PNG
This is the inventory config of this bundle product.

Capture.PNG
In simple products, there is a field qty uses decimals set to no. But there is none in Bundle products.


In the backend, the template has this value of it's textbox:
value= "{{selection_qty}}"

Open in new window


I tried the round and number format in this value but it didn't work because {{selection_qty}} is not a php code.

How can I remove the decimals?
0
I have a database in amazaon web service. I connect it with mysql Workbench. In another server I have a website(magento).
Now how can I connect the database with magento website as the database and website is in different server.
0
I am at a loss in not finding this info.
Assuming all the transactional emails go out on a cron job, but they are coming from different departments - sales/shipping etc, so different email accounts so different smtp credentials, but I can't see where to enter them in?
In the 'Store Email Addresses' config section, it just has 'Sender Name' and 'Sender Email', but no password field.
If I leave that blank surely the mail server is going to be vulnerable?
0
Hello, I was working on a website and accidentally got rid of a comma and text in the visual content. It made the slider go from 980x335 to 980x20. So the slider shows but is only 20 pixels long. I have the code in magento but I can't see that there is a static block associated with the slider. I have attached what the code looks like on the content of the page.
ispiritualhomepage.txt
0
Hello,
I'm attempting to add a new form element to a checkout page and have followed instructions from the following guide: http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_step.html

However the static javascript file is not being generated.

The error message for the missing file is

"Unable to resolve the source file for ...heard.js"
The file structure is:

Namespace/Module/view/frontend/layout/checkout_index_index.xml
Namespace/Module/view/frontend/web/js/view/heard.js
Namespace/Module/view/frontend/web/template/heard.html
The value in checkout_index_index.xml is Namespace_Module/js/view/heard

The module is showing in the list of installed modules and I've recompiled the source and the Magento version is 2.1.2
0
I was moving some blocks of code to re-arrange the order and it was working fine until my last edit.  Now I'm not sure what happened.  Please look at the attached home page code and see if there is something wrong.  There is supposed to be a product slider below the image in it's own block.

The website is www.ispiritual.com
homepage.txt
0
[Webinar] How Hackers Steal Your Credentials
LVL 8
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Hello,

We are a company willing to start a new online marketplace, we are in doubts between Yo!kart and Apptha.

For Yo!kart the thing is that their software was made using a closed framework, in the other hand Apptha is an extension which will be added to Magento either Community or Enterprise. Now, my question is, -- because there is no turning back when you start and get order -- do you think Apptha is a good option? using magento got a risk of vulnerabilities once it is available, hackers will be happy to apply it on your store, how true is that?  For Yo!kart, you can't because you need to access the source code and understand how it works, it's not available for everyone like for Magento....

Need your help to decide. Thanks.
0
$query= "SELECT sku from catalog_product_entity ";
$result = mysqli_query($conn,$query);
$prods = array();


foreach($prods as $prod) {
    $product = $soap->call($session_id, 'catalog_product.info', $prod);
    if($product['type']=="simple"){
        //copy product
        $session_id_2 = $soap_2->login( $mage_2_user, $mage_2_api_key );
        $result = $soap_2->call($session_id_2, 'catalog_product.create', array($product['type'], $product['set'], $product['sku'], $product));
        //copy options
        $product_options = $soap->call($session_id, 'product_custom_option.list', $product['sku']);
        $product_options_data = array();
        foreach($product_options as $product_options_data){
            $product_options_get_data = $soap->call($session_id, 'product_custom_option.info', $product_options_data['option_id']);
            //FIX
            for($i=0;$i < count($product_options_get_data['additional_fields']) ;$i++){
                unset($product_options_get_data['additional_fields'][$i]['value_id']);
            }
            $result2 = $soap_2->call($session_id_2,"product_custom_option.add", array($result, $product_options_get_data));
        }

        //copy media
        $product_images = $soap->call($session_id, 'catalog_product_attribute_media.list', $product['sku']);
        echo "--".count($product_images)."--";
        for($i=0;$i < count($product_images) ;$i++){
            unset($product_images[$i]['file']);
            $curl = 

Open in new window

0
I don't understand that I have System/Config/Developer/Logging enabled, system+exception files defined. I can see a system.log being made so i know permissions are ok, but.....I've spent half a day adding echo's to a list.phtml file to finally have one output :
 Fatal error: Call to a member function getProductUrl() on a non-object in /hostname.co.uk/app/code/core/Mage/Catalog/Model/Product.php on line 1412 

Open in new window

But no log anywhere. This is only happening remotely and I haven't got remote debug so that's why i'm poking in the dark, but why no log?
Is it because this call come from a .phtml file and not php?
0
We are trying to import orders into Magento CE 1.9.2.4 that have been exported from Magento CE 1.7.0.2 using Commerce Extensions Order Export/Import module. http://www.commerceextensions.com/magento-dataflow-batch-import-export-orders-to-csv.html.

We are having issues with the quality of data when trying to import the orders into the destination site.

Specifically, if we are trying to import a batch of say, ten orders, all of the orders get associated with the first customer in that list.  Sample import data attached for review.

It looks like the first customer_id value in the incoming data is populated into that field in the sales_flat_order and sales_flat_order_grid tables for ALL of the orders.

Has anyone else encountered this issue?

More generally, does anyone have a robust solution for importing batches of orders from one version of Magento to another that can create invoices, shipments (credit memos if possible), customers if they don’t exist.  We need to preserve order increment id and customer id so that the relationship between these is maintained.  Happy to take recommendations on other possible modules.

export.csv
0
I took the code from a StackOverflow post to build a module to accept only certain coupons for customers with a certain email domain for Magento v 1.0.4.1 (Yes, I know it is old but we cannot upgrade due to core modifications by a contractor so do not ask)
 
This is the code (located in /app/code/local/NA/LimitCoupon/Module):
 
<?php
class NA_LimitCoupon_Model_Observer 
{
    protected $_domainsAllowed = array(array('COUPON1', 'email1.com'), 
                                        array('COUPON2', 'email2.com')
                                      );

    public function validate(Varien_Event_Observer $observer)
    {

$timestamp = date("m-d-Y H:i:s");
$msg = "Timestamp:".$timestamp;
$fp = fopen("/var/tmp/".__FUNCTION__.".txt", 'a');
fwrite($fp, $msg . "\n");
fclose($fp);

        try 
        {
            $this->validateRestriction($observer);
        }
        catch (Mage_Core_Exception $e) 
        {
            Mage::getSingleton('checkout/session')->addError($e->getMessage());
        }
        catch (Exception $e) 
        {
            Mage::getSingleton('checkout/session')->addError($this->__('Cannot apply the coupon code.'));
            Mage::logException($e);
        }
    }


    public function validateRestriction(Varien_Event_Observer $observer)
    {



        $errMsg = false;
        // Get the quote: 
        $quote = $event->getQuote();
        // obtain the code being used
        $code = $quote()->getCouponCode();
        // Get the current 

Open in new window

0
I am using Magento 2 enterprise edition (2.0.6)

I want to apply discount on sub total, Discount is applied from cart page (added a button on cart which applies the discount) and then if I go to checkout discount is visible there.

Now I am trying to add button on checkout second page to apply discount. The discount is applied but the order summary is not updated. If I click on button (checkout page) and go to payment express, it shows the discounted amount.

even if i go to cart page after applying discount on checkout it is visible on cart and then visible on checkout also.

I took reference from to apply discount

From what I can see the value is updated in the modal just not on the view on the site bar, a point in the right direction would be great.

Below is my code

[Namespace]/[ModuleName]/etc/sales.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/sales.xsd">
  <section name="quote">
    <group name="totals">
      <item name="custom" instance="[Namespace]\[ModuleName]\Model\Total\Quote\Custom" sort_order="420">
      </item>
    </group>
  </section>
</config>

Open in new window


I created Model under [Namespace]/[ModuleName]/Model/Total/Quote/Custom.php

namespace [Namespace]\[ModuleName]\Model\Total\Quote; 
class Custom extends 

Open in new window

0

Magento

207

Solutions

13

Articles & Videos

269

Contributors

Magento is an open-source e-commerce platform written in PHP for e-commerce web sites. Magento employs the MySQL/MariaDB relational database management system, the PHP programming language, and elements of the Zend Framework. It applies the conventions of object-oriented programming and model–view–controller architecture. Magento also uses the entity–attribute–value model to store data.

Top Experts In
Magento
<
Monthly
>