[-] FO : Apply changes from commit 1.4.X 1d0d59845b5f9cb9333a89e60523ab41df076d89 no cache for POST queries

This commit is contained in:
gRoussac
2013-01-23 15:48:15 +01:00
parent f8d5b33251
commit a48d2668d3
20 changed files with 144 additions and 69 deletions
+20 -13
View File
@@ -86,8 +86,9 @@ function changeAddressDelivery(obj)
if (new_id_address_delivery > 0) // Change the delivery address
{
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: 'json',
@@ -158,8 +159,9 @@ function changeAddressDelivery(obj)
});
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: 'json',
@@ -270,8 +272,9 @@ function deleteProductFromSummary(id)
if (typeof(ids[3]) !== 'undefined')
id_address_delivery = parseInt(ids[3]);
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: 'json',
@@ -393,8 +396,9 @@ function upQuantity(id, qty)
if (typeof(ids[3]) !== 'undefined')
id_address_delivery = parseInt(ids[3]);
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: 'json',
@@ -473,8 +477,9 @@ function downQuantity(id, qty)
if (newVal > 0 || $('#product_'+id+'_gift').length)
{
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType: 'json',
@@ -774,8 +779,9 @@ $(document).ready(function() {
$('#allow_seperated_package').live('click', function() {
$.ajax({
type: 'GET',
url: baseUri,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
data: 'controller=cart&ajax=true&allowSeperatedPackage&value='
@@ -815,7 +821,8 @@ function updateExtraCarrier(id_delivery_option, id_address)
$.ajax({
type: 'POST',
url: url,
headers: { "cache-control": "no-cache" },
url: url + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
+2 -1
View File
@@ -108,7 +108,8 @@ function sendOrderMessage()
$.ajax({
type: "POST",
url: $('#sendOrderMessage').attr("action"),
headers: { "cache-control": "no-cache" },
url: $('#sendOrderMessage').attr("action") + '?rand=' + new Date().getTime(),
data: paramString,
success: function (msg){
$('#block-order-detail').fadeOut('slow', function() {
+2 -1
View File
@@ -102,7 +102,8 @@ function updateAddresses()
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : $('#id_address_invoice').val();
$.ajax({
type: 'POST',
url: baseUri,
headers: { "cache-control": "no-cache" },
url: baseUri + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
+29 -13
View File
@@ -53,7 +53,8 @@ function updatePaymentMethodsDisplay()
$('#opc_payment_methods-overlay').fadeIn('slow', function(){
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
@@ -78,7 +79,8 @@ function updateAddressSelection()
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
@@ -164,7 +166,8 @@ function getCarrierListAndUpdate()
$('#opc_delivery_methods-overlay').fadeIn('slow');
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
@@ -213,7 +216,8 @@ function updateCarrierSelectionAndGift()
$('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow');
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
@@ -257,7 +261,8 @@ function confirmFreeOrder()
$('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow');
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "html",
@@ -311,7 +316,8 @@ function saveAddress(type)
$.ajax({
type: 'POST',
url: addressUrl,
headers: { "cache-control": "no-cache" },
url: addressUrl + '?rand=' + new Date().getTime(),
async: false,
cache: false,
dataType : "json",
@@ -362,7 +368,8 @@ function updateNewAccountToAddressBlock()
$('#opc_account-overlay, #opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow');;
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
dataType : "json",
@@ -471,7 +478,8 @@ $(function() {
$('#SubmitLogin').click(function() {
$.ajax({
type: 'POST',
url: authenticationUrl,
headers: { "cache-control": "no-cache" },
url: authenticationUrl + '?rand=' + new Date().getTime(),
async: false,
cache: false,
dataType : "json",
@@ -553,7 +561,8 @@ $(function() {
$.ajax({
type: 'POST',
url: callingFile,
headers: { "cache-control": "no-cache" },
url: callingFile + '?rand=' + new Date().getTime(),
async: false,
cache: false,
dataType : "json",
@@ -675,7 +684,8 @@ function bindInputs()
$('#opc_delivery_methods-overlay').fadeIn('slow');
$.ajax({
type: 'POST',
url: orderOpcUrl,
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: false,
cache: false,
dataType : "json",
@@ -753,7 +763,9 @@ function multishippingMode(it)
{
// Reload the cart
$.ajax({
url: orderOpcUrl,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
data: 'ajax=true&method=cartReload',
dataType : 'html',
cache: false,
@@ -811,7 +823,9 @@ function multishippingMode(it)
// Disable multi address shipping
$.ajax({
url: orderOpcUrl,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
data: 'ajax=true&method=noMultiAddressDelivery'
@@ -819,7 +833,9 @@ function multishippingMode(it)
// Reload the cart
$.ajax({
url: orderOpcUrl,
type: 'POST',
headers: { "cache-control": "no-cache" },
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
data: 'ajax=true&method=cartReload',
+7 -4
View File
@@ -35,9 +35,10 @@ reloadProductComparison = function() {
$.ajax({
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
async: false,
cache: false,
success: function(){
return true;
}
return true;
}
});
});
@@ -51,12 +52,13 @@ reloadProductComparison = function() {
$.ajax({
url: 'index.php?controller=products-comparison&ajax=1&action=add&id_product=' + idProduct,
async: true,
cache: false,
success: function(data){
if (data === '0')
{
checkbox.attr('checked', false);
alert(max_item);
}
alert(max_item);
}
},
error: function(){
checkbox.attr('checked', false);
@@ -68,6 +70,7 @@ reloadProductComparison = function() {
$.ajax({
url: 'index.php?controller=products-comparison&ajax=1&action=remove&id_product=' + idProduct,
async: true,
cache: false,
success: function(data){
if (data === '0')
checkbox.attr('checked', true);