[ZC 开发]ajax实现所谓的跳转问题

2010年8月9日星期一 | | |

1、在内容页面的时候,当点击add to cart 的时候,如果我们想不直接跳转到结帐的页面的话,只需要在 admin--configuration--my store 中的Display Cart After Adding Product选择flase就行了。。这个在中文的有讨论。。。
2、在商品的列表页面 的时候我们也想要这样的效果的话,就需要修改代码:includes/modules/product_listing.php OR includes/modules/YOUR_TEMPLATE/product_listing.php
中的140行:把一下的

<pre xml:html>
$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
</pre>

换成

<pre xml:html>

$lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
</pre>

 

在1.38a的英文版本测试通过。。。

 
我的QQ空间
zencart之老外SEO
如何选择应该装和不应该装的呢?这里就zencart的Seo模块做个全副...
 

0 评论:


所有文章收集于网络,如果有牵扯到版权问题请与本站站长联系。谢谢合作![email protected]