X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Using POST as the form submission method (https://forum.x-cart.com/showthread.php?t=57618)

almenzies 01-19-2011 02:28 PM

Using POST as the form submission method
 
Hey,

I've set up a very simple product enquiry page so that people can submit questions straight from the product details page.

I'd like to post some variables from the product details page to the enquiry page, but when I use the POST method it does not work (I'm re-directed to a search page).

I assume this is a security measure and is being controlled by auth.php (or a file referenced from there).

It works fine when I use GET, but ideally I'd like to avoid having all the variables in the URL.

My product enquiry page looks like this:

Code:

<?php
require "./auth.php";
require $xcart_dir."/include/categories.php";
require "products.php";
$smarty->assign("main","productenquiry");
func_display("customer/home.tpl", $smarty);
?>


When I comment out the first line (auth.php) the correct url appears in the browser, but I get inclusion errors etc. When I include the line I am simply redirected to a search page.

Any help would be greatly appreciated.

Cheers.

cflsystems 01-19-2011 03:19 PM

Re: Using POST as the form submission method
 
Do not include products.php. This script does search for products and returns the result and shows search page

gb2world 01-19-2011 03:46 PM

Re: Using POST as the form submission method
 
In case you find it easier - there is a free Product Enquiry mod at Xcartmods: http://www.xcartmods.co.uk/x-cart-direct-product-enquiry-form.html

---

almenzies 01-21-2011 01:29 AM

Re: Using POST as the form submission method
 
Doh!

Awesome, cheers Steve.


All times are GMT -8. The time now is 12:11 AM.

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