Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Clean URL and Category id

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 07-14-2019, 11:36 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Clean URL and Category id

Hello, I am trying to write a module which adds an output to a catalogue page of certain categories (should this be in the forum "Modifying designs and features"?).
The problem is that if I enable clean URL $_GET['category_id'] doesn't give the Category id. Would there be any solution for this?



Thank you very much in advance.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
  #2  
Old 07-14-2019, 03:16 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Clean URL and Category id

Why are you using $_GET? Use XC way - \XLite\Core\Request::getInstance()->category_id
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
Ed B. (07-14-2019)
  #3  
Old 07-14-2019, 11:14 PM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Clean URL and Category id

Oh, that works fine, thank you. As a matter of fact, I had "tried" it and somehow I kept making syntax errors wrapping it, so I had given away the idea But calling this method directly, things do work.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:59 AM.

   

 
X-Cart forums © 2001-2020