Questions tagged [url]

Denotes question about URL issues and custom URLs.

Filter by
Sorted by
Tagged with
2
votes
1answer
666 views

Magento 2 : How to get current product programmatically in a helper?

Could someone advise what's the best way to get the current product in a custom helper? Basically if I am a product page I need to get it's sku
2
votes
1answer
359 views

Magento 2 can I have 2 front names for a module?

I want to create a module for which I would like 2 frontName is it possible. if yes how can I do it ? Example 1. example.com/a/index/test 2. example.com/b/index/test both pointing to app/code/...
2
votes
1answer
3k views

SecurityError: Permission denied to access property “tinymce” on cross-origin object

I'm using Magento 1.9.3.4 AND KeyCDN. I configured the js/media/css files to come from CDN. On the CDN I enabled the CORS. The CDN uses HTTP/2, shared SSL and the Origin Shield setting is set to "...
2
votes
1answer
509 views

Magento 2 Observer for 404 Page

I want to log all 404 page in magento 2. Recently we have moved from woo-commerce to magento 2 and all the product/category/pages URL are now changed. We want to log all 404 Page URL and take ...
2
votes
1answer
2k views

Get only the page path of the URL

I need to get the path of the current page like - /customer/account/ NOT http://magento.dev/customer/account/index/ Any idea how to do it?
2
votes
2answers
2k views

Echoing SERVER HTTP_REFERER in Magento 2

In native php we can display url referrer by echo $_SERVER['HTTP_REFERER'];. Now by Magento 2 i want to do the same thing, i have tried echo $this->getRefererUrl();, but it gives me page not found ...
2
votes
1answer
271 views

When I call Frontend controller action is called but after success it sets admin_in url

Currently i have faced one issue. when i call frontend controller from this url project/index.php/become-a-ditributor.html front controller action call successfully but after success my url show ...
2
votes
2answers
103 views

Get on-click URL

I have site using Magento 1.7, and have as a first page a login that is mandatory. I implemented the mandatory login via an observer, that is in charge of only allowing acces to the login page while ...
2
votes
1answer
2k views

magento 2: get url query string

What is the magento 2 equivalent of $_SERVER['QUERY_STRING'] I want to retrieve the full query string from the url and would like to do this using the framework's built in functions.
2
votes
2answers
2k views

Magento 2: How to get the theme url in the phtml file?

Magento version:2.0.0 How to get the theme url in the phtml file? there has a global function for it?
2
votes
1answer
896 views

redirect logout to phtml page instead of logging out

Log out option will be there in entire site and if we click on "LOg out". it will log out the customer from the site. but for some reason, if i click on log out , it should redirect to some link. ...
2
votes
2answers
467 views

Magento 1.9.1.1 puts url in search field

I'm faced strange thing in Magento Every time when loading any page (e.g. catalog, product, cms page) it puts the URL of this loaded page in search field. Template is Madison Island standard rwd ...
2
votes
1answer
30 views

URL Issue where the URL keeps extending

I have just launched my 2nd Magento store on calzeat.com and i am having an issue where going between certain pages the url doesn't work right. For example when i go to calzeat.com/contact then i ...
2
votes
6answers
3k views

How to forward all the 404 Magento pages to the front page?

I have a simple question...I had an old store and people bookmarked specific product pages in their browsers as well as Google search points to some specific pages. I have now installed a new version ...
2
votes
1answer
137 views

Add custom routers for custom product types

I have created a custom product type extending from Mage_Catalog_Model_Product_Type_Abstract. What I would like to do is change this product's main controller class to use my own. If a user clicks the ...
2
votes
1answer
174 views

url structure is not working well in magento site with categories and sub categories

we used following format under " age" menu in [Current Demo URL][2] code : [PASTEBIN DEMO][3] **"shop by age "**is main category and all other are sub category. but urls are generating like as in ...
2
votes
1answer
732 views

How can I explicitly get product image URLs which use the insecure media URL as their base?

Our default site configuration uses a CDN for our insecure media URLs and no CDN for our secure media URLs. This is how things should work the majority of the time, but we have a case that needs to ...
2
votes
2answers
3k views

get other store url on same page

I have many pages which has different url key for different stores. Can I get current URL on basis of store ID. function I am using right now is getCurrentUrl(). I mean let suppose i have two ...
2
votes
1answer
6k views

Nginx working configuration for 1.7.XX

I have this store running on Apache, Magento 1.7.0.2 Then I decided to clone the application on a test server, running Nginx. I first tried mine, naive rewrite: rewrite ^(.*index\.php)\/(.*) $1?$2 ...
2
votes
2answers
153 views

How to restrict direct access `/pub` with url?

How to restrict direct access /pub with the project URL (www.domain.com/pub) in Magento 2.
2
votes
2answers
550 views

How to compose URL for AJAX in Adminhtml Magento 1.9

I'm inside the Admin area, I'm adding a check inside the products, inside my File phtml write: <?php $ajaxUrl = Mage::helper('adminhtml')->getUrl('adminhtml/MyCompany_MyModule_AjaxController/...
2
votes
1answer
52 views

My website is being forward to another URL off the search engine links

When you type my website in the address bar you make your way to our website. But if you Google or Yahoo us and click on the link they provide as a search result you get forwarded to another URL that ...
2
votes
1answer
3k views

Check if product has uploaded image In Magento 2

I need to generate an email template with product image included in it, i need to check if the product image exist or not , if product image not exist i want to generate magento 2 default product ...
2
votes
1answer
640 views

Why the Campaign Tracking Parameters isn't working on Product Pages?

I have a situation where I send out email campaigns which link back to products. The link code is in the format: ?utm_campaign=EnewsNov&utm_medium=email&utm_source=HouseList&utm_term=...
2
votes
1answer
213 views

How can I see the controller class (which one is it) for a page URL?

I need to find which controller is in charge of a URL http://127.0.0.1/mysite/index.php/sales/order/history/ I am working on a website, and I want to know which controller is controlling this URL....
2
votes
5answers
620 views

How to apply condition for specific page in magento?

I want to apply condition for specific page coming from url. It is neither a category page nor a custom cms page. Url is like localhost/project/index.php/news/blog.html. I want to apply condition for ...
2
votes
1answer
4k views

jQuery ajax data to controller

I am trying to make my first ajax request in magento to controller file but can not get it working. My .js file is: jQuery.ajax({ type: 'post', url: 'vendor_module/index/...
2
votes
3answers
1k views

How to get Magento root url properly?

I have custom script located inside Magento root directory used for ajax call. I am wondering what would be the safest way to get proper root url, no matter which store is user currently at. Will ...
2
votes
1answer
490 views

magento extension new routers not working (404)

I added some routes to my Magento extension and it worked on localhost and my test server, however, when a client installed the extension all the new routes lead to the site's 404 page. The client ...
2
votes
1answer
387 views

How do I ensure that all links on my Magento site use the correct base URL

I get my localhost URL of my Magento store on some parts of my site So when I open the website (now on a live server) I get the URL I want but when I check links in my footer I'll get the localhost ...
2
votes
1answer
1k views

Configurable product with different URLS for simple

If I sell a t-shirt which has 2 colours, normally I would have 1 URL for the configurable product as the 2 simple products would be set to have a visibility of hidden. However I would quite like to ...
2
votes
1answer
59 views

Magento Canonical Issue

I have an issue that I don't understand. I never did some code changes about it. Problem is, a normal magento site must go www.site.com/xyz when I type site.com/xyz in the address bar right? Well ...
2
votes
1answer
1k views

An error occurred while saving the URL rewrite Magento

I'm currently running Magento ver. 1.9.0.1 I would like to remove the .html prefix at the end of all url's on my site, but when I remove the .html from System > Configuration > Catalog > Search Engine ...
2
votes
1answer
268 views

display all products with “attribute value = 1” by single click

we use catalog price rules to give discount for all products. we have 1000 products in a site. i have to give 50 % discount for 200 products. what i did is i created an attribute "my_attribute" and ...
2
votes
1answer
1k views

Base URL is not working properly

Our url is omitting the first '/', like so: ourdomain.comindex.php when it should be ourdomain.com/index.php. I've looked everywhere in the config, and haven't found a reason why it should be doing ...
2
votes
1answer
2k views

404 Errors when trying to access other subdirectories in root with magento serving as primary (Solved)

I have magento located in a subdirectory in public_html/magento the .htaccess I used to redirect magento to the root is based on installing Magento in subdirectory Root .htaccess file contains ...
2
votes
1answer
322 views

Issue with to Force www. and SSL Mutlistore

Myself and my developer are having issues trying to force Magento to use https for all links and add the www. before our website domain. Currently, if you go to www. thepoultryhatchery .com it will ...
2
votes
1answer
227 views

UNQ_INDEX_PROCESS_INDEXER_CODE

a few time per day i get the following error (as listed in the reports) a:5:{i:0;s:124:"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'catalog_url' for key '...
2
votes
2answers
4k views

Multi-website language switcher not showing

This is my first time creating a multi-lingual webshop, so first I created 2 storeviews, where the switcher was working fine. Then I found out that I needed to create multi-websites instead. I did it ...
2
votes
1answer
94 views

How to rewrite url?

Now every catalog url rewrites to catalog\category\view. But I would like to rewrite it to my own controller. Is there any simple way to do it?
2
votes
1answer
1k views

Product collection to get canonical product url By cron process

its really strange to get such kind of issue relate to get product correct url below is my collection to get product information $store = Mage::app()->getDefaultStoreView(); $...
2
votes
1answer
726 views

Adding urldecode to getURL array

I need to add urldecode to the below function but unsure how to modify it so... public function getAddFilterUrl($attribute) { $filtering = $this->getRequest()->getParam('filtering', array())...
2
votes
1answer
4k views

Layered Navigation - altering URLs

[No Extension pitches please (if I want to be spammed, I'll use the magento forum :D)] I can see this/similar has been asked before (and elsewhere). In most cases, I see people 'recommending' ...
2
votes
1answer
928 views

getImage by Label not working in Bundle item

I want to get the image by its label, inside a bundle product's each options selection item. Each selection item is a simple product. echo Mage::getModel('catalog/product')->load($product_id) ...
2
votes
1answer
219 views

Magento Link to Another Module

$fieldset->addField('orderinfo', 'link', array( 'label' => Mage::helper('web')->__('Order Info'), 'style' => "", 'href' => "*/".$url, 'value' => '...
2
votes
2answers
47 views

Observer to fire on customer login Page Url (baseUrl.“customer/account/login”) magento 2

I want to fire observer on customer login Page url(baseUrl."customer/account/login") magento 2. I tried customer_login event but it's firing after customer login. etc/events.xml <?xml version="...
2
votes
1answer
432 views

In Magento 2,I can't Open Categories With New URL

If I add new URL then it's showing 404 error when it open frontend side.If it open with old URL it's working. For Ex. I have added new URL "business-card-gift-card-holders123" for category.It's ...
2
votes
1answer
203 views

Magento 2 : How Can I Add Arabic URL to Products and Collections

How can I add Arabic URL to products and collections in my Magento 2 store?
2
votes
1answer
442 views

Generate Adminhtml Controller url with get parameter in Block

I have a controller for adminhtml area like this: namespace Namespace\Module\Controller\Adminhtml\Order; use Magento\Framework\Controller\ResultFactory; use Magento\Sales\Model\Order; class ...
2
votes
1answer
1k views

get controller name by page url

I want to get the previous page controller action name from previous page URL in Magento 1.9. I get the previous page url by this: Mage::app()->getRequest()->getServer('HTTP_REFERER'); Now I ...