Duplicate file includes? |
Post Reply |
Author | |
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
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? |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
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: 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! |
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
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? Edited by Brett - 23-May-2017 at 5:59pm |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
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.
|
|
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
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 Edited by Brett - 28-May-2017 at 12:29am |
|
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
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!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |