emiliano Posted December 2, 2002 Posted December 2, 2002 Hello, I just upload cieto Featured Products v1.5. I fixed many bugs from version 1.0 and now it works with less files. Please read the readme file before using it. Although I realease a beta-final version it will be final version if someone post that had no problems with it... Cheers Emiliano Download it http://www.oscommerce.com/downloads.php/co...ions,749/type,3 Quote patagonia, argentina
quicklyshop Posted December 3, 2002 Posted December 3, 2002 Hi Thank you for your hardwork. Is there any sample of this contribition we can see. Quote I can't type a trick like i can type.
emiliano Posted December 3, 2002 Author Posted December 3, 2002 You can see a test shop at Spanish http://www.patagoniasoaring.org.ar/emi/cat...php?language=es English http://www.patagoniasoaring.org.ar/emi/cat...php?language=en I delete the language box :) Emiliano Quote patagonia, argentina
emiliano Posted December 3, 2002 Author Posted December 3, 2002 There are no layout diferences between v1.0 and v1.5 (so the test site looks the same). The diferences are that the script run faster now and that I include a admin/categories.php file so it?s easier to install the contribution. If you change your categories.php file please contact me in order to make it work. -------- TO DO (if you want to help me, contact me!) -------- Translate to english the readme file (it?s in english, but in MY english, which sucks)Add the posibility to limit the short description quantity of characters in the admin panel... To create the posibility to add a diferent image to show in the default.php file - diferent from the one you have in your product_info.php To choose to have or not the "add to cart" button. Emiliano Download it http://www.oscommerce.com/downloads.php/co...ions,749/type,3 Quote patagonia, argentina
guanche Posted December 4, 2002 Posted December 4, 2002 Emiliano, Nice contribution, does it show featured products at random or only in the order they are entered? Quote
emiliano Posted December 4, 2002 Author Posted December 4, 2002 it shows the products in the order you enter them in the featured table.. now you have change my todo list --------- TO DO --------- Show all the featured products or set a max quantity of products to showChoose from order them by the date you enter them in the featured table or just ramdon Emiliano Quote patagonia, argentina
dreamscape Posted December 4, 2002 Posted December 4, 2002 in the readme it says: "If there are more featured products than the maximum allowed to be displayed, a random selection will be shown." but it only shows the most recently added featured prods... there is no random selection... Is this planned to be added? If not, might you tell me how I could change the module to show a random sample instead? Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 5, 2002 Author Posted December 5, 2002 let me work it out.. emiliano Quote patagonia, argentina
emiliano Posted December 5, 2002 Author Posted December 5, 2002 With this changes now the contribution actually show the maximun set in configure.php but not random show.. just the lastest entered.. define('MAX_DISPLAY_FEATURED_PRODUCTS', '2'); Made this changes: In file catalog/modules/featured.php line 24 At the end of the line ... pd.products_name"; with this... ... pd.products_name limit " . MAX_DISPLAY_FEATURED_PRODUCTS; Then comment line 26 So i should look like this // $featured_products_max = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_FEATURED_PRODUCTS_LISTING, $featured_products_query_raw, $featured_products_numrows); If some wants to help me with the random thing it would be great.. at the time i have many exams at the university... cheers emiliano Quote patagonia, argentina
dreamscape Posted December 5, 2002 Posted December 5, 2002 If some wants to help me with the random thing it would be great.. at the time i have many exams at the university... cheers emiliano the featured products contribution that you took yours from displays a random sample if the max number is higher than the total # in the category... how does it do it? Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 5, 2002 Author Posted December 5, 2002 i'll look at the code of aubrey featured products... cheers emiliano Quote patagonia, argentina
emiliano Posted December 5, 2002 Author Posted December 5, 2002 Please make this modification in order to improve the contribution: All the lines number are aproximately, just use then to know more or less the line position... There are 2 files to modify... Made this changes in catalog/modules/featured.php There are four main modifications to do in this file: *1* First of all delete this line: # require('../application_top.php'); ---------- *2* Then, delete this one: $featured_products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_FEATURED_PRODUCTS_LISTING, $featured_products_query_raw, $featured_products_numrows); ---------- *3* The following change would show the featured products if you set it at catalog/includes/configure.php or it'd show the new products infobox After <?php in line 21 add this if(FEATURED_PRODUCTS_DISPLAY == true) { And before the last ?> (line 40) add this else // If it's disabled, then include the original New Products box { include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); } ---------- *4* Now is time to show random featured products, not just the lastest added if you have more featured products that the max quantity to show that you set up at catalog/includes/configure.php . Go to the select query line (24) and change this: p.products_date_added DESC, pd.products_name With this: rand() -------------------- Made this changes in catalog/configure.php *1* Delete this line (42) define('MAX_DISPLAY_FEATURED_PRODUCTS_LISTING', '10'); -------------------- Hey that is all!!! I hope you found this changes usefull... Emiliano Quote patagonia, argentina
dreamscape Posted December 6, 2002 Posted December 6, 2002 yes yes that does the trick... (though a } needed to be added before else on my system) thank you thank you... Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 6, 2002 Author Posted December 6, 2002 i missed that... sorry :cry: I?d love to see some live sites using this contribution.... Please post any url using this contribution... Emiliano PS: i will launch v1.6 in the next week (it?ll be v1.5 plus this changes) Quote patagonia, argentina
dreamscape Posted December 6, 2002 Posted December 6, 2002 hey I am still developing... don't have a host yet... but I like this contrib so much and the layout of the featured products listing so much that I changed my product listings when browsing or searching to match this layout... I also slightly modified it that if the short description is blank, it takes the 1st 25 words of the actual description and lists them with "..." after it... I did this because I use EasyPopulate and didn't want to have to go through and create a short description for every product. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 6, 2002 Author Posted December 6, 2002 i?d like to add that feature to the contribution.. how do you do it? Emiliano Quote patagonia, argentina
dreamscape Posted December 6, 2002 Posted December 6, 2002 this is how I did it... in /catalog/includes/modules/featured.php in the select query (about line 26) where it says "select p.products_id, pd.products_name, pd.products_shortdescription, ..." add in the products description: "select p.products_id, pd.products_name, pd.products_shortdescription, pd.products_description, ..." then in the array about line 32 after the short description, add the description to the array: 'description' => $featured_products['products_description'], Then in /catalog/includes/modules/featured_products.php about line 28 where it inserts the short description, you need to break this line <td valign="top" class="main" width="80%"><div align="justify"><?php echo '<b><font size="1">::</font> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '"><u>' . $featured_products_array[$i]['name'] . '</u></a>:</b> ' . $featured_products_array[$i]['shortdescription'] . '<br>' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TEXT_PRICE . ' ' . $products_price; ?> and insert and IF statement... <td valign="top" class="main" width="80%"><div align="justify"> <?php echo '<b><font size="1">::</font> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '"><u>' . $featured_products_array[$i]['name'] . '</u></a>:</b>'; if ($featured_products_array[$i]['shortdescription'] == ''){ $bah = explode(" ", $featured_products_array[$i]['description']); for($desc=0; $desc<25; $desc++) { echo "$bah[$desc] "; } echo '...'; } else { echo $featured_products_array[$i]['shortdescription']; } echo $featured_products_array[$i]['shortdescription'] . '<br>' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TEXT_PRICE . ' ' . $products_price; ?> Actually I took it a step further and changed the layout a little too... I changed lines 21 to 51 to the following: <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><hr width="100%" size="1" noshade color="#366E3D"> </td> </tr> <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" rowspan="4" align="right" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $featured_products_array[$i]['image'], $featured_products_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td> <td width="80%" valign="top" class="main"><div align="justify"><?php echo '<b><font size="1">::</font> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '"><u>' . $featured_products_array[$i]['name'] . '</u></a>:</b>'; ?> </div></td> </tr> <tr> <td valign="top" class="main"> <?php if ($featured_products_array[$i]['shortdescription'] == ''){ $bah = explode(" ", $featured_products_array[$i]['description']); for($desc=0; $desc<25; $desc++) { echo "$bah[$desc] "; } echo '...'; } else { echo $featured_products_array[$i]['shortdescription']; } ?> </td> </tr> <tr> <td valign="top" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TEXT_PRICE . ' ' . $products_price; ?></td> </tr> <tr> <td align="left" valign="top" class="main"><b><font size="1">:</font></b> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">'; ?>More Info</a> <b><font size="1">::</font></b> <?php echo '<a href="' . tep_href_link('default.php', tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">'; ?>Buy Now</a> <b><font size="1">:</font></b></td> </tr> It makes the layout a little nicer to read and add a "More Info" and "Buy Now" link after the price... here is a screenshot of the modified layout: Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 6, 2002 Author Posted December 6, 2002 sweeeeeeeet can i add this to the contrib? emiliano Quote patagonia, argentina
dreamscape Posted December 6, 2002 Posted December 6, 2002 absolutely... thats why we're all here... to help each other out and build a kickin ecommerce app in process Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 7, 2002 Author Posted December 7, 2002 i will never get tired saying that I love this open source thing... Quote patagonia, argentina
gwinger Posted December 7, 2002 Posted December 7, 2002 Might you send me that files? Cu Guido [email protected] Quote xtcommerce Templates And this is my new coding project. A multilingual sitesearch for online stores. Have a look at the search field left in the navbar: WWW.BE-INSHAPE.DE Proteinpulver, Aminosäure Liquids and Supplements for Bodybuilding and Fitness It finds all the ingredients like amino acids, carnitin and proteins if you don't know how to spell. In realtime...
nouck Posted December 7, 2002 Posted December 7, 2002 Hi, instead of having pictures under each other, each specail like right next to each other in row instead of collumn? Like three special right next each other from left to right, instead of from top to bottom. That way, I will have more room to display others things. Is there a code for that, and where would I inserted? Thanks nouck Quote
dreamscape Posted December 7, 2002 Posted December 7, 2002 use v1.3 by the other contributor... it displays them in the "normal" OSC layout if thats what you want Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
emiliano Posted December 7, 2002 Author Posted December 7, 2002 Remember that this contribution allows you to insert a short description, so in order to have a more organized layout I use row instead of colums!!! Emiliano Quote patagonia, argentina
dreamscape Posted December 8, 2002 Posted December 8, 2002 hey emiliano I just realized another bug with this contrib... if you are on the main page, it shows featured products from all categories (thats good)... but if you go into a top level category, it still shows featured products from all categories (that is bad... shouldn't it show only featured products from within that top level category)... I never noticed this before, because at the time I only had products within 1 category Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.