我有一个网站,链接是http://www.taranmarlowjewelry.com。当你第一次进入该网站时,你会发现右上角是空白的,如果你刷新页面,购物车将出现在右上角。
我认为之所以第一次进入该网站时不显示购物车是因为没有设置cookie或其他原因。
如果我删除cookie名称为PHPSESSID
且值为fd9lshsp92opvo9aotvoljajj0
(每次删除cookie并创建新cookie时值都会更改),则右上角的购物车会再次消失。
这似乎是cookie没有被正确设置……但是我对cookie不太了解。
如何正确设置此cookie?
我不知道在wordpress中设置PHPSESSID
的位置,因此找不到其代码……但是这是购物车的代码,不确定是否有用。
<div style="float:right;" class="taranShoppingCart"><?php echo wpsc_shopping_cart(); ?></div>
它输出....
<div class="shoppingcart">
<table style="color:#F69F8E;">
<tfoot>
<tr class="cart-widget-total">
<td class="cart-widget-count" style="text-align:right; padding-right:25px; padding-bottom:5px;" colspan="3">
<a href="?page_id=15">Shopping Bag 6 item(s)</a>
</td>
</tr>
<tr>
<td style="padding-right:15px;">
<a href="?page_id=15">Hello admin</a>
</td>
<td style="padding-right:15px;">
<a href="http://www.taranmarlowjewelry.com/wp-login.php?action=logout&_wpnonce=f26aa87ea3">Logout</a>
</td>
<td>
<div class="live_search_form">
<form class="product_search" action="http://www.taranmarlowjewelry.com/?page_id=14/" method="GET" style="font-size:0px !important;">
<input id="wpsc_search_autocomplete" class="wpsc_product_search wpsc_live_search_embed .wpsc_live_search" style="padding:0px !important; height:25px !important; vertical-align:top;" autocomplete="off" name="product_search">
<script type="text/javascript">
/* <![CDATA[ */
jQuery('#wpsc_search_autocomplete').keypress( function(e){
if ( e.keyCode == 13 ) {
var url = 'http://www.taranmarlowjewelry.com/?page_id=14'+'?product_search='+jQuery(this).val();
url = encodeURI(url);
jQuery(window.location).attr('href', url);
}
});
/* ]]> */
</script>
<input id="button" class="searchBtn" type="submit" value="GO" name="button">
</form>
</div>
</td>
</tr>
</tfoot>
</table>
</div>
任何帮助都将不胜感激,感谢您的时间。
谢谢, J