Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cieto Featured Products 2.5 MS2


emiliano

Recommended Posts

cieto Featured Products 2.5 MS2

 

10/30/2003 V2.5 MS2

  • Many bugs fixed.
  • Cleaner files.
  • Less files to get this thing work.
  • No language files, minor modification to osC language files.
  • Now it's possible to use the green/red light button to activate a featured product.
  • Set featured products from the Contents. It's possible to create a product and assign the featured status right there with expire date.
  • The featured section in Catalog it's gone.
  • Configuration from admin:
    -->Featured period (how many days do you want a featured product to be as featured when you click on the green light).

Download @ http://www.oscommerce.com/community/contributions,505

patagonia, argentina

Link to comment
Share on other sites

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

This is great contr. but i have 2 problems:

 

when i try to use the green button to activate a product i have this error message:

 

Fatal error: Call to undefined function: tep_set_product_featured() in d:\easyphp1-7\www\milestone\catalog\admin\categories.php on line 42.

 

The code for this line is

            tep_set_product_featured($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);

.

 

The second error is that the link in the word "Buy now" doesn' t work.

 

I think that my are little errors and so what i can do to restore all the functionality of this contribution?

 

Thank You.

Link to comment
Share on other sites

Update to readme.txt

(new readme upload to contributions)

 

### [ Step 4 ] ##################

### File : admin/includes/functions/general.php

 

Replace this:

// Sets the status of a product
 function tep_set_product_status($products_id, $status) {
   if ($status == '1') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '1', products_last_modified = now() where products_id = '" . (int)$products_id . "'");
   } elseif ($status == '0') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0', products_last_modified = now() where products_id = '" . (int)$products_id . "'");
   } else {
     return -1;
   }
 }

 

With this:

 

// Sets the status of a product
 function tep_set_product_status($products_id, $status) {
   if ($status == '1') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '1', products_last_modified = now() where products_id = '" . (int)$products_id . "'");
   } elseif ($status == '0') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0',  products_featured = '0', products_last_modified = now() where products_id = '" . (int)$products_id . "'");
   } else {
     return -1;
   }
 }

////
// Sets the featured status of a product
 function tep_set_product_featured($products_id, $featured) {
   if ($featured == '1') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_featured = '1', products_last_modified = now(), products_featured_until = '". date('Y/m/d', time() + 86400 * DAYS_UNTIL_FEATURED_PRODUCTS)."' where products_id = '" . (int)$products_id . "'");
   } elseif ($featured == '0') {
     return tep_db_query("update " . TABLE_PRODUCTS . " set products_featured = '0', products_last_modified = now(), products_featured_until = NULL where products_id = '" . (int)$products_id . "'");
   } else {
     return -1;
   }
 }

patagonia, argentina

Link to comment
Share on other sites

Hi,

 

This mod is trully multi language?

 

 

Regards, Andre.

Yes off course.. it works as the product description/name does...

 

Featured date

If someone has problems with the featured until date, please give me a call...

 

cheers

emiliano

patagonia, argentina

Link to comment
Share on other sites

great mod,

i offered to help testing but didn't get a reply!

 

anyway, it works great...

followed your latest install instructions and only had issues with:

 

the section:

 

### Catalog

 

### [ Step 1 ] ##################

 

### File : includes/languages/xxxx/index.php

 

 

 

Cut and paste it before the end of file:

 

 

 

define('TABLE_HEADING_PRICE', ....

 

define('TABLE_HEADING_BUY_NOW', ....

 

 

 

Then add (check what to add for each language):

 

 

 

For english add:

 

define('TEXT_NO_FEATURED_PRODUCTS', 'There are no featured products');

 

define('TEXT_MORE_INFO', 'More information');

 

 

 

the above:

define('TABLE_HEADING_PRICE', ....

define('TABLE_HEADING_BUY_NOW', ....

 

should be: define

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_BUY_NOW', '');

 

I left the define-buy_now blank as this is where the More Information link shows.

 

Also I had to add a define in admin/includes/languages/english.php as:

define('TABLE_HEADING_FEATURED', 'Featured');

 

 

 

other than that, i'd recommend adding featured products above your whats new rather than replacing it but that's just my opinion...

 

also, this doesn't show as a normal infobox on your main page - ie. doesnt have the title bar and borders so if you limit the featured products display to under the amount of featured products there is no link to a page with all featured products.

to see what i mean, have a look at:

http://193.193.168.63/store.php (a test site)

 

i'd like the featured box to look like the whats new box with a title bar and border and also include a link in the title bar to all featured products...

 

and finally, it doesn't seem to work under categories - ie. shouldn't it show featured products from a given category when viewing that category?

Link to comment
Share on other sites

the idea it's to get rid off the infoboxes!!!

 

about showing products of the category you're in that was a bug corrected many versions ago, i will released a new version in this days to solve all the bugs...

 

 

cheers

patagonia, argentina

Link to comment
Share on other sites

Hi Emiliano

 

I have installed cieto Featured Products 2.5 MS2

 

This is what appears on the main page

 

Juggling Book  
this is the short text  


TABLE_HEADING_PRICE: $24.95
TABLE_HEADING_BUY_NOW   TEXT_MORE_INFO   

--------------------------------------------------------------------------------

 

The buy now button leads to an Error 404

 

I tried the suggested corrections from the forum without any success?

 

Any suggestions?

 

thanks

 

James

Link to comment
Share on other sites

Hello Emiliano,

 

I have just installed cieto Featured Products 2.5 MS2

On the main page the featured products are displayed as

 

Juggling Book  
...  


TABLE_HEADING_PRICE: $24.95
TABLE_HEADING_BUY_NOW   More info  

 

The buy now text link produces a 404 error.

 

Any suggestions as to what is wrong?

 

thanks

 

James

Link to comment
Share on other sites

I've sorted out the 404 error the link was to default.php not index.php.

 

Also I forgot to mention that in the admin panel the f from featuredProducts Status is missing.

 

Products Status:  In Stock  Out of Stock

eatredProducts Status:  In Stock  Out of Stock

 

Sorry about the double posting when looked last time it was missing so I assumed that I had ommitted to send it, when I should have refreshed the page instead.

Link to comment
Share on other sites

Buy now problem!

includes/modules/featured_products.php

(line 56)

Replace this:

          <td align="left" valign="top" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TABLE_HEADING_PRICE . ': ' . $products_price; ?><br><?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') . '">'; ?><?php echo TABLE_HEADING_BUY_NOW;?></a>  

 

With this:

          <td align="left" valign="top" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br>' . TABLE_HEADING_PRICE . ': ' . $products_price; ?><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">'; ?><?php echo TABLE_HEADING_BUY_NOW;?></a>  

 

Problem with text not define

TABLE_HEADING_PRICE, TABLE_HEADING_BUY_NOW, etc

I'm sure you miss this

 

### Catalog 
### [ Step  1 ] ##################
### File :  includes/languages/xxxx/index.php

 Cut and paste it before the end of file:

 define('TABLE_HEADING_PRICE', ....
 define('TABLE_HEADING_BUY_NOW', ....

 Then add (check what to add for each language):
 
For english add:
 define('TEXT_NO_FEATURED_PRODUCTS', 'There are no featured products');
 define('TEXT_MORE_INFO', 'More information');
 
For german add:
 define('TEXT_NO_FEATURED_PRODUCTS', 'Es gibt kein gekennzeichnete Produkte');
 define('TEXT_MORE_INFO', 'Mehr informationen');

For spanish use:
 define('TEXT_NO_FEATURED_PRODUCTS', 'No hay productos especiales');
 define('TEXT_MORE_INFO', 'Más información');

 

You need to go to includes/languages/english/index.php (example)

 

search for:

 

define('TABLE_HEADING_PRICE', ....

define('TABLE_HEADING_BUY_NOW', ....

 

cut those lines, paste them ad the end of file (before the last ?> ) and then add

 

define('TEXT_NO_FEATURED_PRODUCTS', 'There are no featured products');

define('TEXT_MORE_INFO', 'More information');

 

I hope this solve all the problems..

 

Missing F in Catalog Content

Some language files needs to be change.. i will release a new categories.php this week to solve that problem (a minor one)... i'm trying to solve the dates problem.. wich i think it's more important..

 

 

cheers

emiliano

patagonia, argentina

Link to comment
Share on other sites

Thanks Emiliano,

 

Everything works just fine now.

I put the define lines in alphabetical order in index.php!

  define('TABLE_HEADING_PRICE', 'Price');

  define('TABLE_HEADING_BUY_NOW', '');

  define('TEXT_NO_FEATURED_PRODUCTS', 'There are no featured products');

  define('TEXT_MORE_INFO', 'More information');

 

Why did changing them to the last line fix the problem?

 

James

Link to comment
Share on other sites

Hi Emilano,

 

I've also noticed that when I make changes to product information in the admin panel the featured status of the product switches to on whether or not I want that product to be featured.

 

Minor problem for a great feature!

 

hth James

Link to comment
Share on other sites

Why did changing them to the last line fix the problem?

 

Because inside the if statement you define the text for the main page, the category page and the product listing.. if you copy the lines outside the if statement you are defining the line for all the posibilities (main page, categories, products listing)

 

--------

 

I've also noticed that when I make changes to product information in the admin panel the featured status of the product switches to on whether or not I want that product to be featured.

 

Thanks for letting me know this.. i will release a solution for this simple problem in a day or two..

 

 

cheers

emiliano

patagonia, argentina

Link to comment
Share on other sites

Ok... I'm stupid :(

 

I love this contribution, but I have a few problems (basically because I'm php ignorant)

 

1. How do I get the featured products to show up at the top of the page instead of the bottom?

 

2. In Admin:

 

A. My Products Short Description is displayed as TEXT_PRODUCTS_SHORT

B. TABLE_HEADING_FEATURED shows up in the Catalog listing. (is it supposed to say something else?)

 

Blah:( I really need to learn php. OSC is so picky :-) But it is the best ecommerce solution out there that is open source (imho)

 

Any help would be great:-)

 

Khim~

Do not meddle in the affairs of Dragons, for you are crunchy and good with ketchup :-)

Link to comment
Share on other sites

Cieto Featured Products 2.51 MS2

new release

 

11/03/2003 V2.51 MS2

  • Many bugs fixed.
    -->Some functions where missing in the last release.
    -->Date available and featured until date now works.
    -->Featured status in update product page has previos value as default.
  • New languages lines (I forgot them in the last release)

All bugs from this topic are now corrected.

 

Download @http://www.oscommerce.com/community/contributions,505

patagonia, argentina

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