Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cieto Featured Products v1.5 JUST RELEASE!


emiliano

Recommended Posts

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

patagonia, argentina

Link to comment
Share on other sites

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

patagonia, argentina

Link to comment
Share on other sites

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 show

Choose from order them by the date you enter them in the featured table or just ramdon

Emiliano

patagonia, argentina

Link to comment
Share on other sites

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?

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

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

patagonia, argentina

Link to comment
Share on other sites

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?

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

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

patagonia, argentina

Link to comment
Share on other sites

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)

patagonia, argentina

Link to comment
Share on other sites

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.

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

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:

screen1.gif

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Might you send me that files?

 

Cu Guido

 

[email protected]

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...

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...