Print Page | Close Window

Duplicate file includes?

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=6107
Printed Date: 23-November-2024 at 10:28am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Duplicate file includes?
Posted By: Brett
Subject: Duplicate file includes?
Date Posted: 19-May-2017 at 7:37pm
home.asp (and I believe most of the pages such as viewPrd.asp and viewcategories.asp) includes common.asp, and then later includes header_wrapper.asp, which then includes your selected theme's header.asp file

theme/{yourtheme}/header.asp includes inc_theme_common.asp, which seems to include all of the same files as common.asp

So far, it looks like common.asp is always executed and inc_theme_common.asp is never executed before common.asp

Are these files included twice, or are the include statements ignored? If the files are included twice, is there any reason they need to be? Are there situations where inc_theme_common.asp is loaded but common.asp was never loaded so the include statements need to exist in both places?



Replies:
Posted By: ProductCart
Date Posted: 23-May-2017 at 1:32pm
Hi Brett,

Regarding your specific questions here... we asked our development team for clarification and this is actually all 'by design', since the theme isn’t technically part of the same page. The specific reason behind the approach requires an understanding of how 'server.execute works, and you can find more information about it here: 

http://msdn.microsoft.com/en-us/library/ms525849%28v=vs.90%29.aspx" rel="nofollow - https://msdn.microsoft.com/en-us/library/ms525849(v=vs.90).aspx

Also, we want to mention that the 'include' statements do not pose any sort of performance issue, in case that was a concern for you.

We hope this helps!



-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: Brett
Date Posted: 23-May-2017 at 5:58pm
Yeah I figured it couldn't be that much of a performance issue, if at all. The server.execute thing makes sense. Thanks for the explanation!

*edit*

Does this mean I could remove them all if I was willing to stick with one theme?


Posted By: ProductCart
Date Posted: 23-May-2017 at 6:52pm
Are you referring to all the other 'theme' folders and files? If so, sure... you can remove them if you never plan to use them for the store. Obviously, you shouldn't remove any files above the 'theme' directory, as those are common to any graphical interface or ProductCart functionality.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: Brett
Date Posted: 28-May-2017 at 12:28am
I figured if I switched the theme include in header_wrapper.asp to a standard asp include then I wouldn't need to include those files a second time. I just wouldn't be able to switch my theme since it would be hardcoded. I think I'll just leave it as is though, since it isn't a performance issue.

P.S. I just noticed while reading your reply that the apostrophe seems to be showing up weird on your post. For me it looks like:


Maybe something to do with my browser settings, but I figured I'd let you know. Thanks again for the explanation on the include file thing.

*edit*

Here's a link to the image: http://imgur.com/VFZvNMy


Posted By: ProductCart
Date Posted: 30-May-2017 at 5:24pm
Hi Brett,

Thanks for letting us know your decision... and also about the encoding issue. The 'curly' (smart) quotes thing is such a pain - and I don't understand why some of the single quotes (apostrophes) in our replies are showing up properly, but not that one!


-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net