| '.$this->l('Product').' | -'.$this->l('Quantity').' | -'.$this->l('Priority').' | -
|---|---|---|
|
- '.htmlentities($product['attributes_small'], ENT_COMPAT, 'UTF-8').''; - $this->html .= ' - |
- '.(int)$product['quantity'].' | -'.$priority[(int)$product['priority'] % 3].' | -
- {if $wishlists} - - {/if} - » {l s='My wishlists' mod='blockwishlist'} -
-| - {l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'} - | -
' + added_to_wishlist + '
' - } - ], { - padding: 0 - }); - else - alert(added_to_wishlist); - } - else - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + loggin_required + '
' - } - ], { - padding: 0 - }); - else - alert(loggin_required); - } - } - if (action == 'delete') { - wishlistProductsIdsRemove(id_product); - wishlistRefreshStatus(); - } - if($('#' + id).length != 0) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - } - }); -} - -/** -* Change customer default wishlist -* -* @return void -*/ -function WishlistChangeDefault(id, id_wishlist) -{ - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/cart.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - async: true, - data: 'id_wishlist=' + id_wishlist + '&token=' + static_token, - cache: false, - success: function(data) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - }); -} - -/** -* Buy Product -* -* @return void -*/ -function WishlistBuyProduct(token, id_product, id_product_attribute, id_quantity, button, ajax) -{ - if(ajax) - ajaxCart.add(id_product, id_product_attribute, false, button, 1, [token, id_quantity]); - else - { - $('#' + id_quantity).val(0); - WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].method='POST'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].action=baseUri + '?controller=cart'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].elements['token'].value = static_token; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].submit(); - } - return (true); -} - -function WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) -{ - if ($('#' + id_quantity).val() <= 0) - return (false); - - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/buywishlistproduct.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'token=' + token + '&static_token=' + static_token + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute, - async: true, - cache: false, - success: function(data) - { - if (data) - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + data + '
' - } - ], { - padding: 0 - }); - else - alert(data); - } - else - $('#' + id_quantity).val($('#' + id_quantity).val() - 1); - } - }); - - return (true); -} - -/** -* Show wishlist managment page -* -* @return void -*/ -function WishlistManage(id, id_wishlist) -{ - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'id_wishlist=' + id_wishlist + '&refresh=' + false, - cache: false, - success: function(data) - { - $('#' + id).hide(); - document.getElementById(id).innerHTML = data; - $('#' + id).fadeIn('slow'); - - $('.wishlist_change_button').each(function(index) { - $(this).change(function () { - wishlistProductChange($('option:selected', this).attr('data-id-product'), $('option:selected', this).attr('data-id-product-attribute'), $('option:selected', this).attr('data-id-old-wishlist'), $('option:selected', this).attr('data-id-new-wishlist')); - }); - }); - } - }); -} - -/** -* Show wishlist product managment page -* -* @return void -*/ -function WishlistProductManage(id, action, id_wishlist, id_product, id_product_attribute, quantity, priority) -{ - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'action=' + action + '&id_wishlist=' + id_wishlist + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute + '&quantity=' + quantity + '&priority=' + priority + '&refresh=' + true, - cache: false, - success: function(data) - { - if (action == 'delete') - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - else if (action == 'update') - { - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - $('#wlp_' + id_product + '_' + id_product_attribute).fadeIn('fast'); - } - nb_products = 0; - $("[id^='quantity']").each(function(index, element){ - nb_products += parseInt(element.value); - }); - $("#wishlist_"+id_wishlist).children('td').eq(1).html(nb_products); - } - }); -} - -/** -* Delete wishlist -* -* @return boolean succeed -*/ -function WishlistDelete(id, id_wishlist, msg) -{ - var res = confirm(msg); - if (res == false) - return (false); - - if (typeof mywishlist_url == 'undefined') - return (false); - - $.ajax({ - type: 'GET', - async: true, - dataType: "json", - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - cache: false, - data: { - rand: new Date().getTime(), - deleted: 1, - myajax: 1, - id_wishlist: id_wishlist, - action: 'deletelist' - }, - success: function(data) - { - var mywishlist_siblings_count = $('#' + id).siblings().length; - $('#' + id).fadeOut('slow').remove(); - $("#block-order-detail").html(''); - if (mywishlist_siblings_count == 0) - $("#block-history").remove(); - - if (data.id_default) - { - var td_default = $("#wishlist_"+data.id_default+" > .wishlist_default"); - $("#wishlist_"+data.id_default+" > .wishlist_default > a").remove(); - td_default.append(''); - } - } - }); -} - -function WishlistDefault(id, id_wishlist) -{ - if (typeof mywishlist_url == 'undefined') - return (false); - - $.ajax({ - type: 'GET', - async: true, - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - cache: false, - data: { - rand:new Date().getTime(), - 'default': 1, - id_wishlist:id_wishlist, - myajax: 1, - action: 'setdefault' - }, - success: function (data) - { - var old_default_id = $(".is_wish_list_default").parents("tr").attr("id"); - var td_check = $(".is_wish_list_default").parent(); - $(".is_wish_list_default").remove(); - td_check.append(''); - var td_default = $("#"+id+" > .wishlist_default"); - $("#"+id+" > .wishlist_default > a").remove(); - td_default.append('
'); - } - }); -} - -/** -* Hide/Show bought product -* -* @return void -*/ -function WishlistVisibility(bought_class, id_button) -{ - if ($('#hide' + id_button).is(':hidden')) - { - $('.' + bought_class).slideDown('fast'); - $('#show' + id_button).hide(); - $('#hide' + id_button).css('display', 'block'); - } - else - { - $('.' + bought_class).slideUp('fast'); - $('#hide' + id_button).hide(); - $('#show' + id_button).css('display', 'block'); - } -} - -/** -* Send wishlist by email -* -* @return void -*/ -function WishlistSend(id, id_wishlist, id_email) -{ - $.post( - baseDir + 'modules/blockwishlist/sendwishlist.php', - { - token: static_token, - id_wishlist: id_wishlist, - email1: $('#' + id_email + '1').val(), - email2: $('#' + id_email + '2').val(), - email3: $('#' + id_email + '3').val(), - email4: $('#' + id_email + '4').val(), - email5: $('#' + id_email + '5').val(), - email6: $('#' + id_email + '6').val(), - email7: $('#' + id_email + '7').val(), - email8: $('#' + id_email + '8').val(), - email9: $('#' + id_email + '9').val(), - email10: $('#' + id_email + '10').val() - }, - function(data) - { - if (data) - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '
' + data + '
' - } - ], { - padding: 0 - }); - else - alert(data); - } - else - WishlistVisibility(id, 'hideSendWishlist'); - } - ); -} - -function wishlistProductsIdsAdd(id) -{ - if ($.inArray(parseInt(id),wishlistProductsIds) == -1) - wishlistProductsIds.push(parseInt(id)) -} - -function wishlistProductsIdsRemove(id) -{ - wishlistProductsIds.splice($.inArray(parseInt(id),wishlistProductsIds), 1) -} - -function wishlistRefreshStatus() -{ - $('.addToWishlist').each(function(){ - if ($.inArray(parseInt($(this).prop('rel')),wishlistProductsIds)!= -1) - $(this).addClass('checked'); - else - $(this).removeClass('checked'); - }); -} - -function wishlistProductChange(id_product, id_product_attribute, id_old_wishlist, id_new_wishlist) -{ - if (typeof mywishlist_url == 'undefined') - return (false); - - var quantity = $('#quantity_' + id_product + '_' + id_product_attribute).val(); - - $.ajax({ - type: 'GET', - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - async: true, - cache: false, - dataType: "json", - data: { - id_product:id_product, - id_product_attribute:id_product_attribute, - quantity: quantity, - priority: $('#priority_' + id_product + '_' + id_product_attribute).val(), - id_old_wishlist:id_old_wishlist, - id_new_wishlist:id_new_wishlist, - myajax: 1, - action: 'productchangewishlist' - }, - success: function (data) - { - console.log(data); - console.log(data.msg); - if (data.success == true) { - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('slow'); - $('#wishlist_' + id_old_wishlist + ' td:nth-child(2)').text($('#wishlist_' + id_old_wishlist + ' td:nth-child(2)').text() - quantity); - $('#wishlist_' + id_new_wishlist + ' td:nth-child(2)').text(+$('#wishlist_' + id_new_wishlist + ' td:nth-child(2)').text() + +quantity); - } - else - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + data.error + '
' - } - ], { - padding: 0 - }); - } - } - }); -} diff --git a/modules/blockwishlist/js/index.php b/modules/blockwishlist/js/index.php deleted file mode 100644 index 044cb85ee..000000000 --- a/modules/blockwishlist/js/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/modules/blockwishlist/logo.gif b/modules/blockwishlist/logo.gif deleted file mode 100644 index da3c2a2d7..000000000 Binary files a/modules/blockwishlist/logo.gif and /dev/null differ diff --git a/modules/blockwishlist/logo.png b/modules/blockwishlist/logo.png deleted file mode 100644 index 2251c3419..000000000 Binary files a/modules/blockwishlist/logo.png and /dev/null differ diff --git a/modules/blockwishlist/mails/ag/wishlink.html b/modules/blockwishlist/mails/ag/wishlink.html deleted file mode 100644 index 07ed59784..000000000 --- a/modules/blockwishlist/mails/ag/wishlink.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
| - |
-
|
- - |
- {l s='My wishlists' mod='blockwishlist'}
-
-{l s='Permalink' mod='blockwishlist'}:
--
- - {/if} -{$product.name|truncate:30:'...'|escape:'html':'UTF-8'}
- - {if isset($product.attributes_small)} - {$product.attributes_small|escape:'html':'UTF-8'} - {/if} -{l s='No products' mod='blockwishlist'}
-{/if} diff --git a/modules/blockwishlist/views/templates/front/mywishlist.tpl b/modules/blockwishlist/views/templates/front/mywishlist.tpl deleted file mode 100644 index 01e9e2f2b..000000000 --- a/modules/blockwishlist/views/templates/front/mywishlist.tpl +++ /dev/null @@ -1,118 +0,0 @@ -{* -* 2007-2015 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA| {l s='Name' mod='blockwishlist'} | -{l s='Qty' mod='blockwishlist'} | -{l s='Viewed' mod='blockwishlist'} | -{l s='Created' mod='blockwishlist'} | -{l s='Direct Link' mod='blockwishlist'} | -{l s='Default' mod='blockwishlist'} | -{l s='Delete' mod='blockwishlist'} | -
|---|---|---|---|---|---|---|
| - {$wishlists[i].name|truncate:30:'...'|escape:'html':'UTF-8'} - | -- {assign var=n value=0} - {foreach from=$nbProducts item=nb name=i} - {if $nb.id_wishlist eq $wishlists[i].id_wishlist} - {assign var=n value=$nb.nbProducts|intval} - {/if} - {/foreach} - {if $n} - {$n|intval} - {else} - 0 - {/if} - | -{$wishlists[i].counter|intval} | -{$wishlists[i].date_add|date_format:"%Y-%m-%d"} | -{l s='View' mod='blockwishlist'} | -
- {if isset($wishlists[i].default) && $wishlists[i].default == 1}
- - - - {else} - - - - {/if} - |
- - {l s='Delete' mod='blockwishlist'} - | -
- {l s='Other wishlists of %1s %2s:' sprintf=[$current_wishlist.firstname, $current_wishlist.lastname] mod='blockwishlist'} - {foreach from=$wishlists item=wishlist name=i} - {if $wishlist.id_wishlist != $current_wishlist.id_wishlist} - {$wishlist.name} - {if !$smarty.foreach.i.last} - / - {/if} - {/if} - {/foreach} -
-{/if} - -{$product.name|truncate:30:'...'|escape:'html':'UTF-8'}
- - {if isset($product.attributes_small)} - {$product.attributes_small|escape:'html':'UTF-8'} - {/if} -' + added_to_wishlist + '
' - } - ], { - padding: 0 - }); - else - alert(added_to_wishlist); - } - else - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + loggin_required + '
' - } - ], { - padding: 0 - }); - else - alert(loggin_required); - } - } - if (action == 'delete') { - wishlistProductsIdsRemove(id_product); - wishlistRefreshStatus(); - } - if($('#' + id).length != 0) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - } - }); -} - -/** -* Change customer default wishlist -* -* @return void -*/ -function WishlistChangeDefault(id, id_wishlist) -{ - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/cart.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - async: true, - data: 'id_wishlist=' + id_wishlist + '&token=' + static_token, - cache: false, - success: function(data) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - }); -} - -/** -* Buy Product -* -* @return void -*/ -function WishlistBuyProduct(token, id_product, id_product_attribute, id_quantity, button, ajax) -{ - if(ajax) - ajaxCart.add(id_product, id_product_attribute, false, button, 1, [token, id_quantity]); - else - { - $('#' + id_quantity).val(0); - WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].method='POST'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].action=baseUri + '?controller=cart'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].elements['token'].value = static_token; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].submit(); - } - return (true); -} - -function WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) -{ - if ($('#' + id_quantity).val() <= 0) - return (false); - - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/buywishlistproduct.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'token=' + token + '&static_token=' + static_token + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute, - async: true, - cache: false, - success: function(data) - { - if (data) - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + data + '
' - } - ], { - padding: 0 - }); - else - alert(data); - } - else - $('#' + id_quantity).val($('#' + id_quantity).val() - 1); - } - }); - - return (true); -} - -/** -* Show wishlist managment page -* -* @return void -*/ -function WishlistManage(id, id_wishlist) -{ - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'id_wishlist=' + id_wishlist + '&refresh=' + false, - cache: false, - success: function(data) - { - $('#' + id).hide(); - document.getElementById(id).innerHTML = data; - $('#' + id).fadeIn('slow'); - - $('.wishlist_change_button').each(function(index) { - $(this).popover({ - html: true, - content: function () { - return $(this).next('.popover-content').html(); - } - }); - }); - } - }); - -} - -/** -* Show wishlist product managment page -* -* @return void -*/ -function WishlistProductManage(id, action, id_wishlist, id_product, id_product_attribute, quantity, priority) -{ - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php?rand=' + new Date().getTime(), - headers: { "cache-control": "no-cache" }, - data: 'action=' + action + '&id_wishlist=' + id_wishlist + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute + '&quantity=' + quantity + '&priority=' + priority + '&refresh=' + true, - cache: false, - success: function(data) - { - if (action == 'delete') - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - else if (action == 'update') - { - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - $('#wlp_' + id_product + '_' + id_product_attribute).fadeIn('fast'); - } - nb_products = 0; - $("[id^='quantity']").each(function(index, element){ - nb_products += parseInt(element.value); - }); - $("#wishlist_"+id_wishlist).children('td').eq(1).html(nb_products); - } - }); -} - -/** -* Delete wishlist -* -* @return boolean succeed -*/ -function WishlistDelete(id, id_wishlist, msg) -{ - var res = confirm(msg); - if (res == false) - return (false); - - if (typeof mywishlist_url == 'undefined') - return (false); - - $.ajax({ - type: 'GET', - async: true, - dataType: "json", - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - cache: false, - data: { - rand: new Date().getTime(), - deleted: 1, - myajax: 1, - id_wishlist: id_wishlist, - action: 'deletelist' - }, - success: function(data) - { - var mywishlist_siblings_count = $('#' + id).siblings().length; - $('#' + id).fadeOut('slow').remove(); - $("#block-order-detail").html(''); - if (mywishlist_siblings_count == 0) - $("#block-history").remove(); - - if (data.id_default) - { - var td_default = $("#wishlist_"+data.id_default+" > .wishlist_default"); - $("#wishlist_"+data.id_default+" > .wishlist_default > a").remove(); - td_default.append(''); - } - } - }); -} - -function WishlistDefault(id, id_wishlist) -{ - if (typeof mywishlist_url == 'undefined') - return (false); - - $.ajax({ - type: 'GET', - async: true, - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - cache: false, - data: { - rand:new Date().getTime(), - 'default': 1, - id_wishlist:id_wishlist, - myajax: 1, - action: 'setdefault' - }, - success: function (data) - { - var old_default_id = $(".is_wish_list_default").parents("tr").attr("id"); - var td_check = $(".is_wish_list_default").parent(); - $(".is_wish_list_default").remove(); - td_check.append(''); - var td_default = $("#"+id+" > .wishlist_default"); - $("#"+id+" > .wishlist_default > a").remove(); - td_default.append('
'); - } - }); -} - -/** -* Hide/Show bought product -* -* @return void -*/ -function WishlistVisibility(bought_class, id_button) -{ - if ($('#hide' + id_button).is(':hidden')) - { - $('.' + bought_class).slideDown('fast'); - $('#show' + id_button).hide(); - $('#hide' + id_button).css('display', 'block'); - } - else - { - $('.' + bought_class).slideUp('fast'); - $('#hide' + id_button).hide(); - $('#show' + id_button).css('display', 'block'); - } -} - -/** -* Send wishlist by email -* -* @return void -*/ -function WishlistSend(id, id_wishlist, id_email) -{ - $.post( - baseDir + 'modules/blockwishlist/sendwishlist.php', - { - token: static_token, - id_wishlist: id_wishlist, - email1: $('#' + id_email + '1').val(), - email2: $('#' + id_email + '2').val(), - email3: $('#' + id_email + '3').val(), - email4: $('#' + id_email + '4').val(), - email5: $('#' + id_email + '5').val(), - email6: $('#' + id_email + '6').val(), - email7: $('#' + id_email + '7').val(), - email8: $('#' + id_email + '8').val(), - email9: $('#' + id_email + '9').val(), - email10: $('#' + id_email + '10').val() - }, - function(data) - { - if (data) - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '
' + data + '
' - } - ], { - padding: 0 - }); - else - alert(data); - } - else - WishlistVisibility(id, 'hideSendWishlist'); - } - ); -} - -function wishlistProductsIdsAdd(id) -{ - if ($.inArray(parseInt(id),wishlistProductsIds) == -1) - wishlistProductsIds.push(parseInt(id)) -} - -function wishlistProductsIdsRemove(id) -{ - wishlistProductsIds.splice($.inArray(parseInt(id),wishlistProductsIds), 1) -} - -function wishlistRefreshStatus() -{ - $('.addToWishlist').each(function(){ - if ($.inArray(parseInt($(this).prop('rel')),wishlistProductsIds)!= -1) - $(this).addClass('checked'); - else - $(this).removeClass('checked'); - }); -} - -function wishlistProductChange(id_product, id_product_attribute, id_old_wishlist, id_new_wishlist) -{ - if (typeof mywishlist_url == 'undefined') - return (false); - - var quantity = $('#quantity_' + id_product + '_' + id_product_attribute).val(); - - $.ajax({ - type: 'GET', - url: mywishlist_url, - headers: { "cache-control": "no-cache" }, - async: true, - cache: false, - dataType: "json", - data: { - id_product:id_product, - id_product_attribute:id_product_attribute, - quantity: quantity, - priority: $('#priority_' + id_product + '_' + id_product_attribute).val(), - id_old_wishlist:id_old_wishlist, - id_new_wishlist:id_new_wishlist, - myajax: 1, - action: 'productchangewishlist' - }, - success: function (data) - { - if (data.success == true) { - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('slow'); - $('#wishlist_' + id_old_wishlist + ' td:nth-child(2)').text($('#wishlist_' + id_old_wishlist + ' td:nth-child(2)').text() - quantity); - $('#wishlist_' + id_new_wishlist + ' td:nth-child(2)').text(+$('#wishlist_' + id_new_wishlist + ' td:nth-child(2)').text() + +quantity); - } - else - { - if (!!$.prototype.fancybox) - $.fancybox.open([ - { - type: 'inline', - autoScale: true, - minHeight: 30, - content: '' + data.error + '
' - } - ], { - padding: 0 - }); - } - } - }); -} diff --git a/themes/hotel-reservation-theme/js/modules/blockwishlist/js/index.php b/themes/hotel-reservation-theme/js/modules/blockwishlist/js/index.php deleted file mode 100644 index a318ca6dc..000000000 --- a/themes/hotel-reservation-theme/js/modules/blockwishlist/js/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); - -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); -exit; \ No newline at end of file diff --git a/themes/hotel-reservation-theme/modules/blockwishlist/blockwishlist-ajax.tpl b/themes/hotel-reservation-theme/modules/blockwishlist/blockwishlist-ajax.tpl deleted file mode 100644 index 8fa0a88fb..000000000 --- a/themes/hotel-reservation-theme/modules/blockwishlist/blockwishlist-ajax.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA| - {l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'} - | -
| - {l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'} - | -
- - -
--
- - {/if} -- {$product.name|truncate:30:'...'|escape:'html':'UTF-8'} - {if isset($product.attributes_small)} - - - {$product.attributes_small|escape:'html':'UTF-8'} - - - {/if} -
-- - -
- -- - -
-| - {l s='Move to %s'|sprintf:$wishlist.name mod='blockwishlist'} - | -
| {l s='Product' mod='blockwishlist'} | -{l s='Quantity' mod='blockwishlist'} | -{l s='Offered by' mod='blockwishlist'} | -{l s='Date' mod='blockwishlist'} | -
|---|---|---|---|
|
-
- - {$product.attributes_small|escape:'html':'UTF-8'} - {/if} - - |
- - {$bought.quantity|intval} - | -- {$bought.firstname} {$bought.lastname} - | -- {$bought.date_add|date_format:"%Y-%m-%d"} - | -
- {l s='No products' mod='blockwishlist'} -
-{/if} diff --git a/themes/hotel-reservation-theme/modules/blockwishlist/views/templates/front/mywishlist.tpl b/themes/hotel-reservation-theme/modules/blockwishlist/views/templates/front/mywishlist.tpl deleted file mode 100644 index 93cb4afe6..000000000 --- a/themes/hotel-reservation-theme/modules/blockwishlist/views/templates/front/mywishlist.tpl +++ /dev/null @@ -1,143 +0,0 @@ -{* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA| {l s='Name' mod='blockwishlist'} | -{l s='Qty' mod='blockwishlist'} | -{l s='Viewed' mod='blockwishlist'} | -{l s='Created' mod='blockwishlist'} | -{l s='Direct Link' mod='blockwishlist'} | -{l s='Default' mod='blockwishlist'} | -{l s='Delete' mod='blockwishlist'} | -
|---|---|---|---|---|---|---|
| - - {$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'} - - | -- {assign var=n value=0} - {foreach from=$nbProducts item=nb name=i} - {if $nb.id_wishlist eq $wishlists[i].id_wishlist} - {assign var=n value=$nb.nbProducts|intval} - {/if} - {/foreach} - {if $n} - {$n|intval} - {else} - 0 - {/if} - | -{$wishlists[i].counter|intval} | -{$wishlists[i].date_add|date_format:"%Y-%m-%d"} | -- - {l s='View' mod='blockwishlist'} - - | -
- {if isset($wishlists[i].default) && $wishlists[i].default == 1}
- - - - {else} - - - - {/if} - |
- - - - - | -
- - {l s='Other wishlists of %1s %2s:' sprintf=[$current_wishlist.firstname, $current_wishlist.lastname] mod='blockwishlist'} - - {foreach from=$wishlists item=wishlist name=i} - {if $wishlist.id_wishlist != $current_wishlist.id_wishlist} - - {$wishlist.name|escape:'htmlall':'UTF-8'} - - {if !$smarty.foreach.i.last} - / - {/if} - {/if} - {/foreach} -
- {/if} - -- {$product.name|truncate:30:'...'|escape:'html':'UTF-8'} - {if isset($product.attributes_small)} - - {$product.attributes_small|escape:'html':'UTF-8'} - - {/if} -
-- - -
- -- {l s='Priority' mod='blockwishlist'}: {$product.priority_name} -
-