douglaswalker Posted September 23, 2015 Share Posted September 23, 2015 Hi there I am currently trying to understand how the message stack works in BS Gold. I have changed the redirect in product_write_reviews.php to go back to the page of the product you were writing about instead of posting to the review page which may well be empty if it is the first review.. made more sense to me. So i changed this code around line 73 from tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action')))); to this .. tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')))); all easy so far and working fine but now I would like add the message stack onto the top of the product_info page that it redirects to. so I have these 2 pieces of code $messageStack->add_session('product_reviews', TEXT_REVIEW_RECEIVED, 'success'); and <?php if ($messageStack->size('review') > 0) { echo $messageStack->output('review'); } ?> I thought I needed to add the code above to the product_info but I can not get it to work....how do i get it to pass the code from the write page to the product_info page... If someone could explain I would greatly appreciate it as I amsure it is staring me in the face. Doug Link to comment Share on other sites More sharing options...
burt Posted September 23, 2015 Share Posted September 23, 2015 Doug $messageStack->add_session('product_reviews' Here you are adding the message into the "product_reviews" stack... if ($messageStack->size('review') > 0) { Here you are outputting a stack called "review". Change either one of these to match the other ... And all should be well. However...the product_info page already has an output for stack called: product_action Thus, you could/should utilise that, and add_session to that stack. $messageStack->add_session('product_action', Link to comment Share on other sites More sharing options...
douglaswalker Posted September 23, 2015 Author Share Posted September 23, 2015 Thanking you sir so $messageStack->add_session('product_action', TEXT_REVIEW_RECEIVED, 'success'); and that is it ...bada-bing Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.