Announcement

Collapse
No announcement yet.

How can I get the customer to return to the same product on a page once they have ..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How can I get the customer to return to the same product on a page once they have ..

    How can I get the customer to return to the same product on a page once they have 'Added to Cart'?

    Below is the solution for 'Quantity on Product Page'. The other add-to-cart methods cannot work with this solution as the information regarding the last product added is not available by the time the buyer is returned to the product page.

    Edit ShoppingCart.pl ( Open with notepad )

    Search for 'sub AddSingleItem'
    Then search for...
    return (BounceAfterAddToCart());
    replace with...
    return (BounceAfterAddToCart($sProdRef));

    Search for 'sub BounceAfterAddToCart' you should see...

    sub BounceAfterAddToCart
    {
    my ($Status, $Message, %OrderDetails, $sCartID, @Response);

    Replace with...

    sub BounceAfterAddToCart
    {
    my ($sProdref) = @_;
    my $sAnchor = ($sProdref eq "") ? "" : "#a". $sProdref; #gtc
    my ($Status, $Message, %OrderDetails, $sCartID, @Response);

    Search for 'standard confirmation', you should see...

    else # standard confirmation
    {
    @Response = ReturnToLastPage($nBounceDelay, ACTINIC::GetPhrase(-1, 1962) . $sCartHTML . ACTINIC::GetPhrase(-1, 1970) . ACTINIC::GetPhrase(-1, 2051),
    $sPageTitle);

    replace with...

    else # standard confirmation
    {
    my $sRefPage = $::Session->GetLastShopPage() . $sAnchor;
    @Response = ACTINIC::BounceToPageEnhanced($nBounceDelay, ACTINIC::GetPhrase(-1, 1962) . $sCartHTML . ACTINIC::GetPhrase(-1, 1970) . ACTINIC::GetPhrase(-1, 2051), $sPageTitle, $::g_sWebSiteUrl, $::g_sContentUrl, $::g_pSetupBlob, $sRefPage, \%::g_InputHash);

    # @Response = ReturnToLastPage($nBounceDelay, ACTINIC::GetPhrase(-1, 1962) . $sCartHTML . ACTINIC::GetPhrase(-1, 1970) . ACTINIC::GetPhrase(-1, 2051),
    # $sPageTitle);

    Please note that the above code starting from My $sRefPage to $sAnchor; is one line and @Response to ::g_InputHash); is one long line.

    Save and Exit. Update the site.

    SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder, replace the script you have changed and upload to you site. If you have a test facility, we strongly recommend that you test any changes before you upload them to your live site.
Working...
X