♥Tsimi   525 Posted October 4, 2018 @raiwa I can confirm the delete button is missing in all versions from the early times. The delete confirm button only is there. Not sure how I could loose a button or wasn't there one from the very beginning? Not sure.. 🤔 Share this post Link to post Share on other sites
♥raiwa   1,419 Posted October 4, 2018 @Yepi. Sorry, must be this code, I forgot the fid. Please add this instead of the above posted: if (isset($_GET['fID'])) { echo '<a href="' . tep_href_link('featured.php', 'page=' . $_GET['page'] . '&action=delete&fID=' . $_GET['fID']) . '">' . tep_draw_button(IMAGE_DELETE, 'minus') . '</a>'; }  1 Tsimi reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
♥raiwa   1,419 Posted October 4, 2018 30 minutes ago, Tsimi said: @raiwa I can confirm the delete button is missing in all versions from the early times. The delete confirm button only is there. Not sure how I could loose a button or wasn't there one from the very beginning? Not sure.. 🤔 Maybe it wasn't there since the earlier versions already. Never noticed this neither others reported. Seems no one missed it 😉 About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
♥raiwa   1,419 Posted October 4, 2018 (edited) @Yepi, @Tsimi, The very correct thing seems to be this: echo '<a href="' . tep_href_link('select_featured.php', 'page=' . $_GET['page'] . '&action=new') . '">' . tep_draw_button(IMAGE_SEARCH, 'search') . '</a>'; echo '<a href="' . tep_href_link('featured.php', 'page=' . $_GET['page'] . '&action=new') . '">' . tep_draw_button(IMAGE_NEW_PRODUCT, 'plus') . '</a>'; echo '<a href="' . tep_href_link('featured.php', 'page=' . $_GET['page'] . '&action=delete&fID=' . $fInfo->featured_id) . '">' . tep_draw_button(IMAGE_DELETE, 'trash') . '</a>'; Like this the button acts always on the selected product, even on first time page load when the first product is selected by default. Please confirm Edited October 4, 2018 by raiwa About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
♥Tsimi   525 Posted October 4, 2018 (edited) @raiwa Yeah that works. Even after page load when the top product is selected by default it does work. Edited October 4, 2018 by Tsimi 1 raiwa reacted to this Share this post Link to post Share on other sites
♥raiwa   1,419 Posted October 4, 2018 Updated Version uploaded: Changes version 1.6.1.:        - Added missing "Delete" button in admin/featured.php All versions updated (GOLD, EDGE and CE FROZEN) https://apps.oscommerce.com/TyAIr&featured-products-bs 1 1 Tsimi and valquiria23 reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
Demitry   40 Posted December 27, 2018 @Tsimi hi Lambros, I'm trying to add a modification to the modules for this addon, where the "See More" button does not display unless there are more featured products listed than are limited to display at any one time. ..because there is no point is sending the customer to the featured products page if they are seeing all of the featured products on whatever page they are on. The problem I'm having is getting the total number of featured products (for lets say, the index page module). It's probably right in front of me, I'm just missing that piece. For example: I condition to display that "See More" button only when the total number of featured products is > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT. I wanted to use tep_db_num_rows($featured_products_query), but that is set in the $query to always equal the content limit setting. I really appreciate any help on this. And it could be a good feature for an update. I'll gladly share it here once I get that mod working properly.  osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Share this post Link to post Share on other sites
♥Tsimi   525 Posted December 27, 2018 @Demitry I did something similar long time ago for my specials on the index page. Show a certain amount of specials on the index page and a button that says Show All which redirects to the specials.php page. I will have to dig it out since I don't remember which shop I did that for. Give me some time and I'll get back to you. 1 Demitry reacted to this Share this post Link to post Share on other sites
Demitry   40 Posted December 27, 2018 @Tsimi yeah, no rush, whenever you can. The "See More" button for the featured products is already there. I'm just trying to condition it to only display when there are more products listed than are limited to display. I really just need to figure out how to get the total featured products listed. Once I have that key, the rest is cake.  osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Share this post Link to post Share on other sites
♥Tsimi   525 Posted December 27, 2018 (edited) @Demitry Ok, I had a look at my specials code and it is not what you are looking for. Actually it is same as the see more button currently inside the Featured Products BS add-on. But I started to do some research and found a solution. It was easier than I thought. You need to use a select count(*) query to get the current total amount of featured products and you only want to get the ones that are set to f.status 1 So this is what I came up with Open your index module featured file FIND: if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD BEFORE: $featured_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $featured_count = tep_db_fetch_array($featured_count_query); Now you can use this here to hide/show the button. if ($featured_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { BUTTON CODE HERE } Let me know if that works for you. Edited December 27, 2018 by Tsimi 1 Demitry reacted to this Share this post Link to post Share on other sites
Demitry   40 Posted December 28, 2018 (edited) @Tsimi ...you put the "bro" in Lambros 😀 yeah man, ..that's exactly what I was trying to achieve and I'm not very good with SQL. Thank you for the help. I just tested this mod and it works as it should. If you want, you can add it to the next update release. Ok, so here is the complete mod to only show the "See More" button when the number of Featured Products exceeds the content limit set in admin for the particular module. I'm just going to use the index module for this sample, and this is for BS Edge. I'm not sure if there is a difference with other versions. /index/modules/content/index/cm_i_featured_products.php 1)     FIND this code: if (tep_db_num_rows($featured_products_query) > 0) { // Show only if we still have products in the array ADD just ABOVE it: // this will show/hide the "See More" button $fp_count_query = tep_db_query("select count(*) as total from featured WHERE status = '1'"); $fp_count = tep_db_fetch_array($fp_count_query); $fp_btn = 'style="display:none;"'; if ($fp_count['total'] > MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CONTENT_LIMIT) { $fp_btn = 'style="display:inline;"'; }  2)     FIND this code: $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? '  ' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm'):'')) . '</h3>'; REPLACE it with this: $featured_products_content = '<h3>' . ($cat_name != '' ? sprintf(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_CATEGORY_TITLE, $cat_name) : MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_TITLE . ((MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_SHOW_BUTTON == 'True')? ' <span ' . $fp_btn . '>' . tep_draw_button(MODULE_CONTENT_INDEX_FEATURED_PRODUCTS_IMAGE_BUTTON_SEE_MORE, 'glyphicon glyphicon-triangle-right', tep_href_link('featured_products.php'), 'primary', null, 'btn-default btn-sm') . '</span>':'')) . '</h3>';   Edited December 28, 2018 by Demitry 2 Tsimi and altoid reacted to this osCommerce: made for programmers, ...because store owners do not want to be programmers. https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce Share this post Link to post Share on other sites
mhsuffolk   58 Posted February 4, 2019 Is it possible for this module to display, in the central area, 4 products across one row on a PC, but only 2 products on a phone screen size? This is so customer does not have to scroll down so far to find other content when using a phone. Live Phoenix 1.0.5.0 on PHP 7.3 Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.7.9) here. Share this post Link to post Share on other sites
Hotclutch   130 Posted February 4, 2019 3 hours ago, mhsuffolk said: Is it possible for this module to display, in the central area, 4 products across one row on a PC, but only 2 products on a phone screen size? This is so customer does not have to scroll down so far to find other content when using a phone. tpl_cm_in_featured_products.php You would have to replace <div class="col-sm-<?php echo $content_width; ?> cm-i-featured_products"> with: <div class="col-sm-6 col-lg-3 cm-i-featured_products"> or recode the module.  1 mhsuffolk reacted to this Share this post Link to post Share on other sites
♥raiwa   1,419 Posted February 4, 2019 31 minutes ago, Hotclutch said: tpl_cm_in_featured_products.php You would have to replace <div class="col-sm-<?php echo $content_width; ?> cm-i-featured_products"> with: <div class="col-sm-6 col-lg-3 cm-i-featured_products"> or recode the module.  I would say it should be (with the module width set to 3 cols: <div class="col-sm-<?php echo $content_width; ?> col-xs-6 cm-i-featured_products"> or: <div class="col-sm-3 col-xs-6 cm-i-featured_products">  About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
Hotclutch   130 Posted February 4, 2019 you can leave the code in place if you want and put it like this: <div class="col-sm-<?php echo $content_width; ?> col-lg-3 cm-i-featured_products"> OR <div class="col-sm-<?php echo $content_width; ?> col-xl-3 cm-i-featured_products">  Share this post Link to post Share on other sites
mhsuffolk   58 Posted February 5, 2019 @raiwa @Hotclutch Thank you for your suggestions. Perhaps I did not explain clearly. Your mod alters the width of each products display. What I wanted to change was the quantity that is displayed. 4 featured products on a big screen, but only two featured products on a phone. This is only to apply to the index page. Live Phoenix 1.0.5.0 on PHP 7.3 Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.7.9) here. Share this post Link to post Share on other sites
Hotclutch   130 Posted February 5, 2019 Then it's not clear. big screen implies col-lg-... or col-xl-... the only way you can have 4 on a row is to specify col-3, i.e col-lg-3 or col-xl-3 also what is the resolution of the phone? are you using bootstrap 3 or 4? the only way you can have 2 on a row is to specify col-6, i.e col-sm-6 or col-md-6. col-xs is deprecated in bootstrap 4. If you mean set a maximum of 4 on big screen and 2 on small screen, then this is not possible without rewriting the code. Share this post Link to post Share on other sites
mhsuffolk   58 Posted February 5, 2019 32 minutes ago, Hotclutch said: If you mean set a maximum of 4 on big screen and 2 on small screen, then this is not possible without rewriting the code Yes, that is what I am trying to achieve. Live Phoenix 1.0.5.0 on PHP 7.3 Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.7.9) here. Share this post Link to post Share on other sites
♥raiwa   1,419 Posted February 5, 2019 (edited) Try the following: - before the while loop define a counter: $i=0; - at the end of the while loop increase the counter: $i++; - at the beginning of the loop, condition a variable which holds xs helper class: if ($i > 2) { $xs_class = 'hidden-xs'; } else { $xs_class = ''; } add the variable to the product div: $featured_products_content .= ' <div class="col-sm-6 col-md-3 ' . $xs_class . '">'; This is for BS3. For BS 4 use the equivalent of "hidden-xs". Edited February 5, 2019 by raiwa About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
Hotclutch   130 Posted February 5, 2019 xs and hidden are deprecated classes in BS4 you have to use a combination of these classes: Hidden on all .d-none Hidden only on xs .d-none .d-sm-block Hidden only on sm .d-sm-none .d-md-block Hidden only on md .d-md-none .d-lg-block Hidden only on lg .d-lg-none .d-xl-block Hidden only on xl .d-xl-none Visible on all .d-block Visible only on xs .d-block .d-sm-none Visible only on sm .d-none .d-sm-block .d-md-none Visible only on md .d-none .d-md-block .d-lg-none Visible only on lg .d-none .d-lg-block .d-xl-none Visible only on xl .d-none .d-xl-block Share this post Link to post Share on other sites
mhsuffolk   58 Posted January 14, 2020 On Phoenix 1.0.4.3 On the index page section entitled "New Products for January" and on the main Featured Products Page the products look like this. However the Content module for the index page looks like this. Can it be changed? Live Phoenix 1.0.5.0 on PHP 7.3 Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.7.9) here. Share this post Link to post Share on other sites
♥raiwa   1,419 Posted January 14, 2020 Hello Martin @mhsuffolk, Featured Products is still on Phoenix 1.0.1.x. The update to the new product listing layout introduced in Phoenix 1.0.2.x is on my "To do" list. If you are able to update the listing (compare to core product listing) I would apreciate that you post it here, it would save me some job. rgds Rainer  About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
♥raiwa   1,419 Posted January 22, 2020 (edited) Uploaded Update: Featured Products CE v2.1.0 Featured Products CE v2.1.0. (CE Phoenix) Compatibility: Phoenix 1.0.4.x Lower versions, please use Featured Products CE v2.0.0. You may use the store side files of this version Featured Products CE v2.1.0. for Phoenix 1.0.2.x-1.0.3.x stores. Changes version 2.1.0.: Updated for OSCOM CE Phoenix 1.0.4.x Updated index content module template files to match Phoenix 1.0.2.x-1.0.4.x product modules Removed word length settings Bootstrapped Admin/featured.php and Admin/select_featured.php Removed Catalan and French admin language files Translated Spanish and German admin/select_featured.php language files Added Spanish and German store language files Updated instructions Edited January 22, 2020 by raiwa 4 Omar_one, domiosc, TomB01 and 1 other reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites
TomB01   37 Posted January 25, 2020 Many thanks for this add-on! I was a bit tired of seeing trivial things in my store default to the main page, just because they've been added last. Something like a Featured Products was sorely needed. For the dummies like me, though, please let me suggest some changes in the Install_manual.txt: Change this - Quote Step 3:  - Within the Grid List Javascript (jQuery) Header Tags Module tick the featured_products.php page checkbox.  - Make sure you install at least one of the modules: content/index, content/index_nested and/or boxes. Once installed you can activate or deactivate them. to this - Step 3:  - Edit the Header Tags Module, "Table Row Click jQuery," by ticking the "featured_products.php" Pages checkbox.  - Make sure you install at least one of the following modules: under Modules-Content, "Featured Products" (index), "Featured Products" (index_nested), or under Modules-Boxes, "Featured Products." Once installed, you can activate or deactivate them. Share this post Link to post Share on other sites
♥raiwa   1,419 Posted January 25, 2020 @TomB01, Thank you. I'll consider it to be added in the next update. 1 valquiria23 reacted to this About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets  Share this post Link to post Share on other sites