1. Modify admin/featured. php
Search for pre_add_confirmation
Replace the code between pre_add_confirmation and break with the following code.
<? PHP Case 'Pre _ add_confirmation ': // Check for Blank or existing featured $ Pre_add_products_id = $ _ Post ['Pre _ add_products_id' ]; $ Pre_add_products_id2 =Explode (',', $ Pre_add_products_id ); Foreach ( $ Pre_add_products_id2 As $ Key => $ Val ){ $ SQL = "Select products_id from". table_products. "Where products_id = '". (INT) $ Val ."'" ; $ Check_featured =$ DB -> Execute ( $ SQL ); If ( $ Check_featured -> Recordcount () = 1 ){ $ SQL = "Select products_id from". table_featured. "Where products_id = '". (INT) $ Val ."'" ; $ Check_featured = $ DB -> Execute ( $ SQL ); If ( $ Check_featured -> Recordcount () <1 ){ // Add empty featured $ Featured_date_available = (Zen_db_prepare_input ( $ _ Post ['Start']) = '')? '1970-01-01 ': zen_date_raw ( $ _ Post ['Start' ]); $ Expires_date = (Zen_db_prepare_input ( $ _ Post ['End']) = '')? '1970-01-01 ': zen_date_raw ( $ _ Post ['End' ]); $ Products_id = Zen_db_prepare_input ( $ Val ); $ DB -> Execute ("insert into". table_featured ." (Products_id, featured_date_added, expires_date, status, featured_date_available) values (' ". (INT) $ Products_id . "', Now (),'". zen_db_input ( $ Expires_date ). "', '1','". zen_db_input ($ Featured_date_available )."')" );}}} Break ; ?>
2. admin \ shortdes \ functions \ General. php
Search function zen_set_field_length
Add the following functions to this function:
Function Zen_set_field_length_1000 ( $ Max = 50, $ Override = False ){ $ Field_length = 1000 ; Switch ( True ){ Case (( $ Override = False And $ Field_length > $ Max )): $ Length = 'Size = "'.( $ Max + 1). '"maxlength = "'. $ Field_length .'"' ; Break ; Default : $ Length = 'Size = "'.( $ Field_length + 1). '"maxlength = "'. $ Field_length .'"' ; Break ;} Return $ Length ;}
3. after completing the above two steps, you can use the background catalog --> Featured Products --> click the product ID to be manually added as a featured button on the right
and enter the product ID in the text box., product IDs are separated by commas (,), for example,.