You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
When a product is added to the cart, people seem to miss the fact that it has been added (i.e. they miss the red text) because the product page opens up again. Two questions:
1. How do I return to the Product Category page once a product has been added?
2. I have tried adding a link called 'Place Order' in the following code, but the path doesn't get translated, it just keeps SCRIPT_COMMON_URL text. Any ideas?
$fd_cart_upd_msg = "Thank you. A quantity of $form_data_product_quantity of item $form_data_product_number - $form_data_product_name has been added to your shopping cart. <a href=%%SCRIPT_COMMON_URL%%&pg=store&sub_pg=order> Place Order</a> $fd_cart_upd_msg_check";
When referencing a macro in the code, use the variable name, not the macro. For your link, use:
$fd_cart_upd_msg = "Thank you. A quantity of $form_data_product_quantity of item $form_data_product_number - $form_data_product_name has been added to your shopping cart. <a href=$full_url_path/$cgi_script_name&pg=store&sub_pg=order> Place Order</a> $fd_cart_upd_msg_check";
Offline
To link into the category page after the cart addition, edit:
./cgi-bin/library/modules/site_store_cart_contents_add_update.pl
Adjust the top lines so they read:
### BEGIN CUT
sub site_store_cart_add_to_cart {
$fd_pg = "store";
$fd_sub_pg = "main_cat";
### END CUT
The drop down to the line:
### BEGIN CUT
$form_data_product_category_info = "$product_category_info";
### END CUT
And change to:
### BEGIN CUT
$form_data_product_category_info = "$product_category_info";
($main_cat_ref_no,$sub_cat_ref_no) = split(/:,$form_data_product_category_info);
$fd_ref = "$main_cat_ref_no";
### END CUT
Offline
Tried this but came back with 'page not found'! Then placed a '?' in the link as below and it did bring me to the order page but it told me that the cart was empty - when it wasn't.
The link doesn't seem to be bringing the 'usr' and 'rnd' numbers with it. Any ideas?
<a href=$full_url_path/$cgi_script_name?&pg=store&sub_pg=order> Place Order</a> $fd_cart_upd_msg_check