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

Can you pass POST vars through CDSEO (mod_rewrite)?

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 05-01-2007, 07:04 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Can you pass POST vars through CDSEO (mod_rewrite)?

Trying to pass POST vars through CDSEO links.

For example, www.yoursite.com/cdseo_cat/&somepostvar=1

And it doesn't work....
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #2  
Old 05-01-2007, 09:53 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

Yes, CDSEO is dynamic and doesn't use mod rewrite, you can pass both GET and POST variables unless you have custom code which for whatever reason is blocking it from doing so. If you email details of what you are trying to do to our support department I'd be happy to help.
Reply With Quote
  #3  
Old 05-01-2007, 09:54 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

FYI, you will however need to pass it through a valid category or product url and use the question mark correctly, i.e.: http://www.domain.com/cdseo_cat/product-name.html?var=value
Reply With Quote
  #4  
Old 05-02-2007, 02:22 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

You are correct. I was forgetting the / after the category. Thanks!

I'm not sure why I thought mod_rewrite was in use.... sorry!




So I'm trying to override and add to the 'hidden but available for sale' concept. I need to hide a certain product type unless the customer enters their email address. Then we have to send them an email with a link to the hidden but available products.

So my link that I use is www.yourstore.com/somecdseocat/?hbafs=1 (where if hbafs is set, I change the search query in products.php and search.php to

Code:
if( $hbafs ) $search_data["products"]["forsale"] = "H";


This works for the direct link but the additional category pages lose the POST data of ?hbafs=1. Now I'm sure this isn't an CDSEO thing....

My additional pages look like this

www.yourstore.com/somecdseocat/index1.html
www.yourstore.com/somecdseocat/index2.html
www.yourstore.com/somecdseocat/index3.html

instead of

www.yourstore.com/somecdseocat/index1.html?hbafs=1
www.yourstore.com/somecdseocat/index2.html?hbafs=1
www.yourstore.com/somecdseocat/index3.html?hbafs=1
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #5  
Old 05-02-2007, 02:52 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

It looks like skin1/customer/main/navigation_seo.tpl is the guy that writes the navigation links. Not sure what I need to do to add the existing POST data to that in the .tpl

Here:

Code:
{if $navigation_page lt $total_super_pages*$config.Appearance.max_nav_pages} <TD valign="middle">&nbsp;<A href="{$cdseo_cat}/{$current_category.cdseo_url}/index{math equation="page+1" page=$navigation_page}.html"><IMG src="{$ImagesDir}/rarrow.gif" width="9" height="9" border="0" alt="{$lng.lbl_next_page}"></A></TD> {/if}
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #6  
Old 05-02-2007, 03:17 AM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

Ok think I got it.

In products.php I added:

Code:
if( $hbafs ) { $search_data["products"]["forsale"] = "H"; $smarty->assign("hbafs","?hbafs=1"); }

Then in customer/main/navigation_seo.tpl I added:

Code:
.html{$hbafs}
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
  #7  
Old 05-02-2007, 03:51 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

That should do the trick.

Some jargon you may want to be aware of: variables referenced through the url are called GET, variables passed hidden through a form submission are called POST, and REQUEST references both GET and POST variables.
Reply With Quote
  #8  
Old 05-02-2007, 03:54 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default Re: Can you pass POST vars through CDSEO (mod_rewrite)?

hehe thanks. I'm more of a C++ guy and usually try to stay away from all that web programming

maybe it's b/c i've been doing a lot of Power On Self Test driver development
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 11:36 PM.

   

 
X-Cart forums © 2001-2020