Questions tagged [geturl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
69 views

Mageto 2 : getUrl returns true even the page is set to disabled

I created a page testPage and use $pageExist = $this->getUrl('testPage') ?> so i could render an a block if it exist like so if ($pageExist) BUT when i go from amdin panel and set page from ...
Lith's user avatar
  • 1
0 votes
1 answer
503 views

Magento 2: Unable to add delete button in edit form using UI component

Getting below error while clicking on edit action from Grid. Fatal error: Uncaught Error: Call to a member function getUrl() on null in /var/www/html/myproject/machpack/app/code/Vendor/Module/Block/...
quickshiftin's user avatar
1 vote
2 answers
979 views

Shipment emails not sent for new orders after upgrade to 2.3.5 - can still send for old orders without errors

When I press "Send tracking information" in Magento admin panel for a shipment there is no email sent and Magento displays the tracking info in the browser. For old orders were shipments were created ...
user5198077's user avatar
0 votes
1 answer
105 views

magento getURL path always add "admin"

I try to generate a link, by using getURL, but some how it keep adding "admin" behind my hostname, what should I do? getURL cannot use in this case? It use to send out transnational email, if ...
Paul Fan's user avatar
  • 604
0 votes
1 answer
411 views

how to use geturl function to custom page in php value in magento 2

<a href="<?php /* @escapeNotVerified */ echo $block->getUrl( 'mpquotesystem/sellerquote/quoteedit/id/404/', ['...
prabhakaran7's user avatar
  • 1,057
1 vote
0 answers
36 views

Sub Category - Load By Attribute (name) URL issue, how to resolve?

Mage::getModel('catalog/category')->loadByAttribute('name', $val)->getUrl(); The above code won't work correctly in my PHP code when I have multiple categories & sub-categories with the same ...
A. Lal's user avatar
  • 121
0 votes
1 answer
1k views

Magento 2 Check if url returns 404

I have ann Array of urls $arr = Array( 'http://magento2.com/url-exist', 'http://magento2.com/url-does-not-exist', 'http://magento2.com/url-does-not-exist', 'http://...
Juliano Vargas's user avatar
1 vote
0 answers
49 views

Magento 2.2.5 get product and product image urls store vise

I want to send all product data of my store into Elasticsearch. In that I am facing one challenge to retrieve product url and product image/video urls store vise. For example:- My default store URL :...
Pratik Navapara's user avatar
3 votes
1 answer
3k views

Magento 2 get CMS page url and output it to a html file

I have the following code in a html file. <div><span data-bind="i18n: 'insurance condition'"></span> <a href="https://example.com/index.php/sales-and-delivery-terms" target="...
Magento Learner's user avatar
0 votes
1 answer
46 views

geturl but ignore store code

Hi I'm trying to replace a link to a cms page "review" in a .phtml file like so: <?php echo $this->getUrl('review'); ?> But this returns www.mydomain/shop/review/ as "shop" is our store ...
Pragman's user avatar
  • 407
1 vote
3 answers
2k views

Magento 1.9 How to find the physical file location from $this->geturl

In Magento, I often see this code from different modules. for example 'url' = $this->geturl('*/path/to/file',array('_forced_secure' => $this->getRequest()->isSecure())) But how can I ...
Magento Learner's user avatar
0 votes
0 answers
68 views

Multisite getUrl not working on server

I have setup two site on localhost server. It's working fine on local. But on server it gives wrong url. It give base url on ajax call. When I use getBaseUrl it give right url Site setup. Website1 :...
MageLerner's user avatar
1 vote
2 answers
2k views

change the over all product url

I have a big doubt in forming url for products. Currently url is formed by using the name attribute. I want to change this to sku_id(attribute) of the products. For this where i need to change?
Rasheed's user avatar
  • 33
1 vote
0 answers
714 views

Magento 2 .htaccses configuration for HTTP get request

I try to get list of modules to localhost with angularJS 2 After i check all code possibilities on angularJS 2 - i need some help with configuration. HTTP GET request with AngularJS 2: import { ...
Goldy's user avatar
  • 1,013
0 votes
1 answer
1k views

how to show product id included in url on product listing page?

I am using magnto2.1.3. i want to show my product id in url on product listing page.below is what i need. how to achieve this?kindly help me please?
Yogesh Raghav's user avatar
2 votes
2 answers
11k views

Magento 2 : Getting Controller URL

I am trying to get controller URL in my Block, but I am not able to get it. I tried this code : $storeId = $this->_storeManager->getDefaultStoreView()->getStoreId(); $url = $this->...
jackson5's user avatar
0 votes
1 answer
3k views

Store direct_url in category text in Magento 2

We are moving our shop to Magento 2 and I just noticed that the store direct_url is not working anymore in our category texts. Does anyone know how you have to put this in Magento 2. We have it in ...
Coen's user avatar
  • 501
2 votes
2 answers
166 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 ...
LeCodeur's user avatar
  • 366
3 votes
1 answer
991 views

Magento 2 secure URL

I am trying to get a secure url like this: $this->storeManager->getStore()->getUrl('someurl', ['_secure' => 'true']); I still get an insecure url with http://... What am I doing wrong?
user3713377's user avatar
1 vote
2 answers
741 views

How to get the public product url for simple products (not visible individually)

I am getting the 404 error every time I am trying to get the correct URL for a product. I want to go to the specific url for that product, is there a specific magento solution to do this? I tried with ...
DanteZ's user avatar
  • 59
1 vote
1 answer
1k views

Mageto2 : how to create a cms page and get complete url for the same ? [closed]

I want to get the complete url of specific page(CMS). How did we get a custom URL link in Magneto2 suppose CMS page is 'about-us'?
Manish's user avatar
  • 3,096
0 votes
1 answer
2k views

Use getUrl() in form action in Magento1.9?

I Want to add some new functionality for magento address book page, I create a Form their, and want to add an action via function like Add New Address Form. Step1. : I Create a new function in ...
Yogita's user avatar
  • 784
0 votes
2 answers
585 views

How to return a secure url?

I have got an issue with the search-bar on my magento website which keeps returning an unsecure url. Be aware I am a bit of a noob when it comes to php. The url gets called in this form tag: <form ...
Pragman's user avatar
  • 407
0 votes
2 answers
2k views

Magento 2: How to get full Currency Switcher

I want to get the full URL to switch currency to use it as a link, Currency switcher use the widget to change the currency, I don't want to use the widget. For Example: This is how works now: <a ...
damianfabian's user avatar
1 vote
0 answers
47 views

Generating URL without website scope

The main entry point of our webshop is shop.com/dashboard. When I want to redirect to this page, I use Mage::getUrl('dashboard') and it works fine. However, when in a specific website (E.g.: shop.com/...
Maarten Troonbeeckx's user avatar
3 votes
3 answers
12k views

Magento 2 get url for specific store

I need to render inside admin grid preview url for specific store (depends on which store is selected). In Magento 1 the code is this: $storeId = (int)$this->getRequest()->getParam('store'); if ...
JohnyFree's user avatar
  • 1,509
1 vote
1 answer
403 views

How to get categories urls in the loop inside widget template?

I have widget template like app/design/frontend/ultimo/name/template/catalog/product/list_featured.phtml What's the way to get category block urls in first h3 like with products? Source is: <?...
user avatar
1 vote
1 answer
681 views

Changing/Modifying Magento 2 Rest Api call from url

I want to use magento2 rest api of products to get list of details of products based on some criteria. For example - http://localhost:8080/magento/index.php/rest/V1/products?searchCriteria[...
Rahul Agrawal's user avatar
4 votes
1 answer
11k views

magento2: getBaseUrl() in helper class? [duplicate]

I was wondering how to use the getBaseUrl() in controller/helper class.. anybody have idea ?
Mohammad Mujassam's user avatar
2 votes
3 answers
2k 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 ...
JohnyFree's user avatar
  • 1,509
0 votes
0 answers
29 views

Creating a URL to direct from one package to another

I have a page in a custom module that gives an admin user the option to view an order's details. When the user clicks the option, I capture their decision in a controller: public function viewAction()...
Skytiger's user avatar
  • 511
0 votes
2 answers
139 views

Get rewritten URL for custom link in customer account dashboard

To my customer account dashboard (and index) I want to add a custom (direct) link to a product category. This product category is only visible to logged in customers, that's why I want to have it here,...
rob_st's user avatar
  • 108
1 vote
1 answer
972 views

How to get link immediate to a tab in product in magento 2

I have a Grid View using UI and i want when click edit a record in this grid, it redirect immediate to tab custom option in Product(#product_info_tabs_customer_options). In Magento 1.x, i create link ...
Lino's user avatar
  • 3,698
2 votes
1 answer
735 views

Problem in getting url of custom module

I am new to magento,I have created a custom module for magento backend. I don't know how to get its url, I have tried some help from online, nothing happens, please tell what should I pass into getUrl ...
Abdul Ghaffar's user avatar
0 votes
1 answer
769 views

Rewrite of block and helper for checkout getCheckoutUrl() not working

I'm trying to rewrite the getCheckoutUrl() functions in Mage/Checkout/Blocks/Onepage/Link.php and Mage/Checkout/Helper/Url.php but the rewrites don't seem to work. My config.xml file ...
Matt Flamm's user avatar
1 vote
0 answers
1k views

Get Current URL, With Modified Parameters

Problem I'm trying to come up with a consistent way to get the current URL of the page, including parameters from both the key/value/key/value structure and the ?key=value&key=value structure. ...
Tyler V.'s user avatar
  • 2,967
3 votes
1 answer
279 views

Mage::getUrl fails without any logs or exceptions

I have a little problem here. I've created a custom module to generate order reports from Magento (CSV file) and to send it by email through a cron task. I developped it on a local environment (...
chris's user avatar
  • 508
3 votes
7 answers
21k views

Get current url without parameters

How can I get current url without utm parameters for example? I need this in phtml templates. Thank you. EDIT EXAMPLE: From url www.example.com/post?utm_source=google&utm_medium=cpc&...
sidlo's user avatar
  • 416
0 votes
3 answers
170 views

How to print out current url on Magento 1.4.1.1?

I'm looking for a way to get current URL from the file "view.phtml". I've tried these 2 differents ways. None of them do print the entire product URL. Worst, the second way crashes... /*1*/ Mage::...
jolyqr's user avatar
  • 231
2 votes
3 answers
2k views

What is the difference between using getUrl() and getUrlPath() in Magento?

What is the difference between using getUrl() and getUrlPath()? In the following code $_brands = Mage::getModel('catalog/category'); $subcat = Mage::getModel('catalog/category'); foreach($brand as ...
Ravi Chan's user avatar
  • 319
4 votes
3 answers
7k views

Replacement of an abstract class in custom module

I read a lot of information on this issue, but have not found a solution. I need to change the function getAddToCartUrl, in class Mage_Catalog_Block_Product_Abstract. Is there a way to make a ...
Dmitry Zar's user avatar
2 votes
1 answer
2k views

Base URLs at Global Scope in Multi-Store Setup

I have a multi-store installation, and each store has its own domain set in System > Configuration > General > Web > [Un]Secure > Base URL: [Global Scope] |-- http://separatenode.com/...
Rick Buczynski's user avatar
0 votes
2 answers
6k views

Get the Request from current URI and pass it to helper

I'm fairly new in Magento, what I'm trying to do is to get the request from URL and get the specific Parameter from it then pass it to Helper, in helper I need to check that specific parameter and run ...
Saghi Ghorbani's user avatar
3 votes
3 answers
813 views

In this code what this customer parameter means

In this code what this customer parameter mean $this->helper('customer')->getRegisterPostUrl();
Vaibhav Ahalpara's user avatar
6 votes
2 answers
22k views

How to get custom module controller url

I have custom admin page edittab.phtml in that page I have ajax call function deleteOldLens(id) { var url = "<?php echo $this->getUrl('/customtabs/ajax/deletelens');?>"; new Ajax....
Sayali's user avatar
  • 115
4 votes
1 answer
8k views

Mage::getUrl returns admin url instead of frontend url

I have create an extension which used frontend as well as admin end. My config code is below. <frontend> <routers> <testimonial> <use>standard</use&...
Franc's user avatar
  • 627
0 votes
1 answer
164 views

Creating and decoding custom URL

I am creating a new module for the blog and stuck. Requirement I have a list of blogs that I am showing at the following url i.e. magento.local/blogs It is working fine. Now, my requirement is when I ...
Naveed Anwar's user avatar
0 votes
1 answer
3k views

Get the content of terms and conditions by url?

I know this is how you get the content of Terms and Condition, <?php if (!$this->getAgreements()) return; ?> <form action="" id="checkout-agreements" onsubmit="return false;"> <ol&...
Run's user avatar
  • 581
0 votes
2 answers
2k views

How to get store category url in Magento 1.8?

how can I get the store category url? I know I can get the store direct url like this, <a href="{{store direct_url="contacts"}}">Contact Us</a> But what about the store's categories? ...
Run's user avatar
  • 581
2 votes
1 answer
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(); $...
liyakat's user avatar
  • 3,985