X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Stopping catalog from deleting specific file (https://forum.x-cart.com/showthread.php?t=36422)

Light Speed 12-30-2007 06:39 AM

Stopping catalog from deleting specific file
 
Version 4.1.8

I have a catalog in the root of my site not in a catalog subdirectory.

When I recreate my catalog I select the checkbox to delete all html files upon catalog creation.

This function ignores the shop_closed.html file.

I have some other non xcart html files at the root of my site that I would like to be left alone upon catalog creation.

What file do I edit to add the list of these files so xcart will no longer delete them?

hooter 12-30-2007 08:04 AM

Re: Stopping catalog from deleting specific file
 
Quote:

Originally Posted by Light Speed
Version 4.1.8

I have a catalog in the root of my site not in a catalog subdirectory.

When I recreate my catalog I select the checkbox to delete all html files upon catalog creation.

This function ignores the shop_closed.html file.

I have some other non xcart html files at the root of my site that I would like to be left alone upon catalog creation.

What file do I edit to add the list of these files so xcart will no longer delete them?

Hello,

Open /your_xcart_folder/admin/html_catalog.php and look for this line:
Code:


if (($file == ".") || ($file == "..") || ($file=="shop_closed.html") || (strstr($file,".html")!=".html"))

Specifically, add your filename(s) to that line within the OR construct (that is what the || signify)
So for example it might look like this after your edit:
Code:


if (($file == ".") || ($file == "..") || ($file=="shop_closed.html") || ($file=="my_file_that_I_dont_want_deleted.html") || (strstr($file,".html")!=".html"))


Light Speed 12-30-2007 08:27 AM

Re: Stopping catalog from deleting specific file
 
ROCKIN :)

Thanks for the pointer!!


All times are GMT -8. The time now is 07:17 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.