PDA

View Full Version : Stopping a page from appearing when GetLastShopPage(); is used


petesouthwest
06-Sep-2007, 04:59 PM
Hi
I know that if I want to change the target of the "Continue Shopping" button of the view cart page I can open CartManager.pl and modify the line

my $sURL = $::Session->GetLastShopPage();

However, what I would like to do is modify a template so that any product using that template does not 'register' as the last shop page. Is that possible?

Many thanks

Kiran
10-Sep-2007, 02:34 PM
Hi Pete

I'm going to run this past development, when I hear from them I'll get back

Kind Regards

petesouthwest
11-Sep-2007, 11:40 AM
That's great thank you :)

Kiran
11-Sep-2007, 01:18 PM
Hi Pete

Development have said that it can be done but it will require some changes to be made to the perl scripts, so if you want to go ahead with it please let us know what version of Actinic(exact point release) you are using so we can do the needful.

Kind Regards

petesouthwest
12-Sep-2007, 08:10 AM
Hi

That will be great :) The version I have is 7.0.6.0.0.0 GBGA

Thank You

Kiran
14-Sep-2007, 09:55 AM
Hi Pete

Please see if the workaround I've provided below helps. Please make sure you have backup's of your site before you try this

__________________
Edit the product layout that is *not* to be saved as the Last Shop Page
and insert anywhere between PRODUCTFORMBEGIN and PRODUCTFORMEND:-

<input type="hidden" name="NOTPRODUCTPAGE" value="1">

Save the template.

Edit Session.pm in the site folder.
Search for 'sub InitURLs'
Scroll down a few lines to see 'if( $sDigest )'
Insert 2 line in front so it reads...

if ($::g_InputHash{'NOTPRODUCTPAGE'} != 1)
{
if( $sDigest )

Scroll down to the comment...

#
# If LASTSHOPPAGE has still not been set, set to default page
# This only happens when the session is expired
#

Insert '}' before the comment so it reads...

}
#
# If LASTSHOPPAGE has still not been set, set to default page
# This only happens when the session is expired
#

Save the file and update the site.
__________________

Kind Regards