Post by twuncher » Thu Nov 11, 2010 3:51 am

i know you can use this (isset($this->request->get['path'])) to get the path on a get()

but what if its a post, how would i parse on the url?

thanks

twun

Newbie

Posts

Joined
Sat May 15, 2010 7:42 pm

Post by Qphoria » Thu Nov 11, 2010 4:10 am

change
$this->request->get['path']
to
$this->request->post['path']

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by twuncher » Fri Nov 12, 2010 1:33 am

that simple hey :) i did try that but didnt get the result i was looking for il give it another go :)

Newbie

Posts

Joined
Sat May 15, 2010 7:42 pm

Post by twuncher » Fri Nov 12, 2010 1:45 am

just doing some testing,

if (isset($this->request->post['post'])) {
$path = $this->request->post['post'];

echo "TEST";
echo $path;
}

i get no echo :(

do i need to do something on the sending side attach the path to the post?

Newbie

Posts

Joined
Sat May 15, 2010 7:42 pm

Post by billyggla » Fri Nov 12, 2010 4:40 am

Try this

Code: Select all

if (isset($REQUEST_['path'])) {
                $path = $REQUEST_['path'];
                
                echo "TEST";
                echo $path;
              }  
 

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by Qphoria » Fri Nov 12, 2010 6:54 am

billyggla wrote:Try this

Code: Select all

if (isset($REQUEST_['path'])) {
                $path = $REQUEST_['path'];
                
                echo "TEST";
                echo $path;
              }  
 
You got your underscore in the wrong spot..
should be $_REQUEST['path']

But still, the original code was fine, you just aren't passing "path" as a POST variable so you will never see the echo

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by billyggla » Fri Nov 12, 2010 6:08 pm

Ok.. no more posts after 8:00pm for me... :-[

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by d_koev » Wed Nov 17, 2010 9:25 pm

Hey guys,

I have a similar question. I am using

Code: Select all

<?php if (isset($_GET['path'])) { ?>
Unfortunately after SEO URL option is enabled, there is no more 'path'. How can I check if it is a category and which specific category it is?

Thanks in advance.

Уеб дизайн и SEO услуги от metaGraphics Design Studio
Check my ShopperLand Premium theme
Check my ModernStore Premium theme


New member

Posts

Joined
Thu Jan 14, 2010 8:03 pm

Post by Qphoria » Wed Nov 17, 2010 10:30 pm

d_koev wrote:Hey guys,

I have a similar question. I am using

Code: Select all

<?php if (isset($_GET['path'])) { ?>
Unfortunately after SEO URL option is enabled, there is no more 'path'. How can I check if it is a category and which specific category it is?

Thanks in advance.
At that point $_GET is no longer used. The seo_url controller then sets its values using $this->request. So use:

Code: Select all

$this->request->get['path'] 

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

New member

Posts

Joined
Thu Jan 14, 2010 8:03 pm

Post by d_koev » Sun Jan 02, 2011 5:17 am

Hey guys, it is me again. :)

I have similar problem again. I want the slider to appear only on home page. I am using this construction:

Code: Select all

 <?php if (isset($_GET['route'])) { ?>
    <?php $id = $_GET['route']; ?>
    <?php } ?>
    <?php if ($id == "common/home") { ?>
    
        <div id="slider"></div> 

<?php } else { ?>
      
    <?php echo "" ?>
     	 	
 <?php } ?>
The problem is that when you first reach the index page 'route' is still not set. Any advice would be highly appreciated. How can I made the silder to appear only when it is home page, even if 'route' is not set yet?

Thanks in advance

Dimitar

Уеб дизайн и SEO услуги от metaGraphics Design Studio
Check my ShopperLand Premium theme
Check my ModernStore Premium theme


New member

Posts

Joined
Thu Jan 14, 2010 8:03 pm

Post by Qphoria » Sun Jan 02, 2011 5:25 am

Corrected & Simplified:

Code: Select all

<?php if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && $this->request->get['route'] == 'common/home')) { ?>
<div id="slider"></div> 
<?php } ?>

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

New member

Posts

Joined
Thu Jan 14, 2010 8:03 pm

Post by adyled » Fri Oct 21, 2011 5:46 pm

Hey how could I use the path /category to segregate the products? Well I wish to segregate the products according to category. Could anyone enlighten me on how to do this? Thank you.

Newbie

Posts

Joined
Fri Oct 21, 2011 4:55 pm

Post by WCNZ » Mon Jun 11, 2012 4:02 pm

Thanks Qphoria - your solution was exactly what I was looking for, and I really appreciate the tip. Cheers! :)

New member

Posts

Joined
Mon Mar 24, 2008 11:21 am

Post by morktron » Wed Jan 30, 2013 12:28 pm

Thanks Qphoria, this helped me out too! :)

Goodbye Virtuemart! Hello Opencart! :)


New member

Posts

Joined
Tue Jun 12, 2012 1:48 pm
Location - Ballina, NSW, Australia
Who is online

Users browsing this forum: No registered users and 26 guests