Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Featured products mod


Guest

Recommended Posts

Hello

I made some modifications to the Featured Products mod that I will upload as a new version, but I need some help to finish it.

 

With this contribution you can set a short description for every product, and the idea is to show this short description in the default page.

 

Everything works great! I can create new products with a short description or not in every language set in the site, I can previsualize the new product, or update it. But (yes.. there is allways a but!)

 

In catalog/includes/modules/featured_products_short.php (is a modification of featured_products.php) is where I have the code that shows the list of featured products in default.php

 

<td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '"><b><u>' . $featured_products_array[$i]['name'] . '</u></b></a><br>' . '<br>' . TEXT_PRICE . ' ' . $products_price; ?></td>

 

I'd like to show the short description in that cell.. but I can't do it! I know that I have to take the value from catalog/includes/modules/featured_products.php

 

$featured_products_query = tep_db_query($featured_products_query_raw);

 while ($featured_products = tep_db_fetch_array($featured_products_query)) {

   $featured_products_array[] = array('id' => $featured_products['products_id'],

                                   'name' => $featured_products['products_name'],

                                   'shortdescription' => $featured_products['products_shortdescription'],

                                   'image' => $featured_products['products_image'],

                                   'price' => $featured_products['products_price'],

                                   'specials_price' => $featured_products['specials_new_products_price'],

                                   'tax_class_id' => $featured_products['products_tax_class_id'],

                                   'manufacturer' => $featured_products['manufacturers_name']);

 }

 

 

But if I add $products_shortdescription or $featured_products_array[$i]['shortdescription'] nothing seems to be working..

 

Some help?

 

Emiliano

 

my english really sucks.. but i hope that someone could understand what i'm trying to say...

Link to comment
Share on other sites

I understand you, and I agree this would be a fantastic addition.

But...

As the English say, I'll be buggered if I can help you. :lol:

 

I hope someone can cos this would be great.

 

Usually Matice is good for help about now...

 

Yoo Hooo Mattice, you there?? :wink:

 

CC.

Link to comment
Share on other sites

I made my first ever contribution!!!!! woooohoooooo :D :D

 

At the moment I'm with many exams at the university, but later I will upload the contribution as a package.. just wait, it's really a great contribution, I'm sorprised that I made it!!

 

Cheers

Emiliano

Link to comment
Share on other sites

  • 2 weeks later...

Anyone know what this is? Getting this on catalog/default.php page - the admin side is working great.

 

1064 - You have an error in your SQL syntax near 'rand() DESC limit 9' at line 1

select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from products p left join specials s on p.products_id = s.products_id left join featured f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by rand() DESC limit 9

[TEP STOP]

Jared Geesey

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