X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Can you pass POST vars through CDSEO (mod_rewrite)? (https://forum.x-cart.com/showthread.php?t=30868)

nfc5382 05-01-2007 07:04 PM

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....

Jon 05-01-2007 09:53 PM

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.

Jon 05-01-2007 09:54 PM

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

nfc5382 05-02-2007 02:22 AM

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

nfc5382 05-02-2007 02:52 AM

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}


nfc5382 05-02-2007 03:17 AM

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}

Jon 05-02-2007 03:51 PM

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. :)

nfc5382 05-02-2007 03:54 PM

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 ;)


All times are GMT -8. The time now is 01:31 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.