How To Display Certain VPCart Page Without Left and Right Column in VPCart 8

How To Display Certain VPCart Page Without Left and Right Column in VPCart 8


If you want to have certain VPCart page to display without the left and right column, while all other VPCart pages still display the normal left/right columns, you can follow the below tricks:

1. Open file shoppage_trailer.htm in folder "templates/default" using notepad or text editor.

2. Locate the code below (around line 18-22) :

<!-- RIGHT BAR -->
<div id="vp_rightsidebox">
<%rightsidebox%>
</div>
<!-- END RIGHT BAR -->




3. Please replace with:


<% if instr(lcase(request.servervariables("script_name")),"shopaddtocart.asp") = 0 then %>
<!-- RIGHT BAR -->
<div id="vp_rightsidebox">
<%rightsidebox%>
</div>
<!-- END RIGHT BAR -->
<%end if%>

NOTE: Please replace shopaddtocart.asp with any other page name you want to display without left / right column.

4. Still on the same file, before this code </body>, please insert :


<% if instr(lcase(request.servervariables("script_name")),"shopaddtocart.asp") <> 0 then %>
<script type="text/javascript">
document.querySelector(".content-wrapper > .row > div:first-child").setAttribute("class","col-md-12 mobile-wrapper");
</script>
<%end if%>

NOTE: Please replace shopaddtocart.asp with any other page name you want to display without left / right column.



5. Save the file and upload to your site.

You are done.

Below is the preview for a VPCart page eg shopaddtocart.asp that will not show the left/right column, but all other pages showing.

Shopaddtocart.asp:



Other pages:






Good luck and if you have any issues after applying this trick, please feel free to submit a helpdesk ticket to us at https://helpdesk.vpcart.com.

Thank you.


Times Viewed:
1360
Added By:
Wilson Keneshiro
Date Created:
8/23/2018
Last Updated:
8/23/2018