Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Open Featured Sets Support


surfalot

Recommended Posts

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

Abstract

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

 

The contribution allows these 4 featured sets:

 

- Featured Products

- Featured Products by Category

- Featured Products by Manufacturer

- Featured Manufacturers

 

The admin has many choices for each section (one section shown here):

 

- Display products in featured boxes.

- Choose to display products from just current category or all featured products.

- Supports unlimited depth of categories

- Optionally displaying buy now buttons.

- Built in optional support for sidkiller(#952) on buy now buttons.

- Choose to display on catalog home, categories, product list, and product info pages.

- Choose layout and position of featured products section.

- Set Maximum number of Featured products to display.

- Display featured products in a column/row layout.

- Specify a specific description or select number of words from default description.

- Supports Asian characters by providing a number of characters description limit.

- Expire feature time periods with ability to suspend expiry.

- Choose from 4 featured products set layouts.

- Choose from 6 featured products set styles.

- Display a box shadow and set the shadow direction.

- Display featured products set in single group box or in individual boxes.

- Set the sort order for the feature products or display random.

- Sort ascending or descending.

- Products vertical line height.

- Products vertical line color.

- Products horizontal line color.

- All formatting is controlled by stylesheet.css entries.

- Turn featured sets on or off.

- Specify the display order for each of the 4 featured sets.

 

+ Based on Wolfens Featured Sets v1.03. See changelog for a list of updates.

 

 

Get it here

Edited by surfalot
Link to comment
Share on other sites

  • Replies 249
  • Created
  • Last Reply

Top Posters In This Topic

Based on Wolfens Featured Sets v1.03

 

hi surfalot

why make a new contribution , where ican t be a featured of his contribution in the same page ?

any screeenshot to show us how it looks like ? tahnks

MS2

Link to comment
Share on other sites

Hello have installed the sets as a a new instal with the require globals off patch, have manually compared code and altered the files.

 

when trying to update some of the features via the admin panel I am getting this error

 

Fatal error: Call to undefined function: tep_cfg_select_featured() in /home/microsoft/catalog/admin/configuration.php(125) : eval()'d code on line 1

 

Is this because of globlals

 

Thanks

Link to comment
Share on other sites

Look at the bottom of this file in the package /catalog/admin/includes/functions/general.php

make sure you have added it to yours.

 

  function tep_cfg_select_featured($select_array, $key_value, $key = '') {
etc...

Link to comment
Share on other sites

i instaled the contribution. the admin module is ok.

 

i have problem accessing my shop:

 

Fatal error: Cannot redeclare tep_set_featured_status() (previously declared in /home/avhitnet/public_html/katalog/includes/functions/featured_sets.php:30) in /home/avhitnet/public_html/katalog/includes/functions/featured.php on line 16

 

i had instaled contribution featured products 1.5.2

 

how can i get rid of this problem???

 

thanks in advance

Link to comment
Share on other sites

i have another problem now.

 

i can set featured for categories and subcategories, but cannot set it for single products (don't get green in administration). What could be wrong?

Link to comment
Share on other sites

i instaled the contribution. the admin module is ok.

 

i have problem accessing my shop:

 

Fatal error: Cannot redeclare tep_set_featured_status() (previously declared in /home/avhitnet/public_html/katalog/includes/functions/featured_sets.php:30) in /home/avhitnet/public_html/katalog/includes/functions/featured.php on line 16

 

i had instaled contribution featured products 1.5.2

 

how can i get rid of this problem???

 

thanks in advance

See post #5 above, just don't add that code from the bottom of /catalog/admin/includes/functions/general.php

Link to comment
Share on other sites

guys what i did wrong???:

looks like you ran the SQL twice. just run the upgrade SQL from: /upgrade/upgrade_ofs.sql

**caution** this will remove all items from the configuration group "99". This is not a problem, as long as you have not changed that in the original script.

Edited by surfalot
Link to comment
Share on other sites

i have another problem now.

 

i can set featured for categories and subcategories, but cannot set it for single products (don't get green in administration). What could be wrong?

you are not getting any error when you click the little 'on' light? is it submitting the page and just coming back as 'off'?

Link to comment
Share on other sites

surfalot thanks for your help. yeah it just comes back as off. i probably did something stupid.

 

hop you can help me. thanks for your contribution. it took you a lot of time i think.

 

best regards,

Miha

Link to comment
Share on other sites

thanks for your contribution. it took you a lot of time i think.

thanks, but 241 deserves most of the credit for this contribution.

 

check to make sure you have added lines 36-69 of contrib file: catalog/admin/categories.php

Link to comment
Share on other sites

Hi surfalot,

 

thanks for this great contrib.

 

It's much easier to install compared to Wolfen.

 

Admin section works fine. But i've got a question: how can i integrate the "base price" contrib. That's pretty important for me, cause i am from germany.

 

What i tried is, to insert and modify this code from "base price" contrib

 

tep_get_products_display_price($new_products['products_id'], true))

 

to

echo '" align="center" valign="top" class="featuredProducts"><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><br>' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . $featured_products_array[$i]['name'] . '</a></div>' . OPEN_FEATURED_TABLE_HEADING_PRICE . $products_price . '' . tep_get_products_display_price($featured_products_array[$i], true) . $buy_now_link . '</td></tr></table>';

 

wherever the buy-now-button appears in featured_sbox_products.php and featured_gbox_products.php

 

But this does not work.

 

The tep_get_products_display_price($featured_products_array[$i], true) needs the corresponding ID from featuredProducts. Think, I am using a wrong one.

 

What I am also looking for, is a description how this contrib works. Because i don't know the difference between th g_box and the s_box modules.

 

Any help appreciated.

Thanks in advance

erdm?nnchen

Link to comment
Share on other sites

:D

 

Got it!!!!

 

 

just modify the additional code for "base price" like this in the open-featured-set-modules:

 

tep_get_products_display_price($featured_products_array[$i]['id'], true)

 

so that the new open-featured-set Code looks like this:

 

 

 

echo '" align="center" valign="top" class="featuredProducts"><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><br>' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '5') . '<br><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products_array[$i]['id'], 'NONSSL') . '">' . $featured_products_array[$i]['name'] . '</a></div>' . OPEN_FEATURED_TABLE_HEADING_PRICE . $products_price . '' . tep_get_products_display_price($featured_products_array[$i], true) . $buy_now_link . '</td></tr></table>';

 

I did this until now in wherever the buy-now-button appears in featured_sbox_products.php and featured_gbox_products.php. There are several occurances, where you have to add this cade-snippet.

 

It works fine with my heavily modified shop (header tags 2.5.5, seo url 2.1c and lots more)

 

what i am still looking for is, why are the g_boxes and s_boxes???

 

 

Good luck to all

erdm?nnchen

Link to comment
Share on other sites

Got it!!!!

 

what i am still looking for is, why are the g_boxes and s_boxes???

Good luck to all

erdm?nnchen

Thanks for working that out, I'll see about adding it to the next version as an option.

 

gbox files display items grouped together in one box. sbox files display items in their own individual boxes (the original way Wolfens did it)

Edited by surfalot
Link to comment
Share on other sites

yes i did that ok. don't know where went wrong :(

 

Make sure you made the change to the SQL queries on lines 1046 & 1050 of /catalog/admin/categories.php, this should have been added to each of the 2 queries: ", p.products_featured, p.products_featured_until"

 

double check that these fields made it into your products table:

 

products_featured_until - date

products_featured - tinyint(1)

 

also double check that lines 731-779 of the file /catalog/admin/includes/functions/general.php made it into your production file.

Edited by surfalot
Link to comment
Share on other sites

Make sure you made the change to the SQL queries on lines 1046 & 1050 of /catalog/admin/categories.php, this should have been added to each of the 2 queries: ", p.products_featured, p.products_featured_until"

 

double check that these fields made it into your products table:

 

products_featured_until - date

products_featured - tinyint(1)

 

also double check that lines 731-779 of the file /catalog/admin/includes/functions/general.php made it into your production file.

 

i must be dumb. everything i checked twice, still no go.

 

i have another question.

i use graphic infobox header and i m not sure where to apply them. i already changed the shadow image, but have to do some code to get header box image look different.

 

u can check it here if you want: avhit

Link to comment
Share on other sites

i must be dumb. everything i checked twice, still no go. ]

 

The only think I can say at this point is to backup your categories.php and replace it with the one in the package, then test. If it works then, keep looking. ;)

 

i use graphic infobox header and i m not sure where to apply them. i already changed the shadow image, but have to do some code to get header box image look different.

 

the headings for the infoboxes are generated at the top of each of the group-boxed (gbox) module files in /catalog/includes/modules/... this example is from the category featured set featured_gbox_categories.php

 

  if ((FEATURED_CATEGORIES_SET_STYLE == '5') || (FEATURED_CATEGORIES_SET_STYLE == '6')) {
$info_box_heading = array();
$info_box_heading[] = array('text' => OPEN_FEATURED_BOX_CATEGORY_HEADING);

new infoBoxHeading($info_box_heading,true,true);
 }

 

the headings use the standard class style that is used in the infoBoxHeading class from the /catalog/includes/classes/boxes.php file. (class="infoBoxHeading")

Link to comment
Share on other sites

i noticed another problem. featured sets seems to take even those products which are not active. so it gives broken link...

if you are talking about the Category Features, you are right about that. one more bug spilled over from the original project. The Product and Manufacturer with Product does handle this correctly.

 

here's your fix, look in /catalog/includes/modules/featured_sets.php

 

search for

where c.categories_featured = '1'

(3 places) replace with:

where p.products_status = '1' and c.categories_featured = '1'

 

Thanks for reporting that! :thumbsup:

Link to comment
Share on other sites

i instaled the contribution. the admin module is ok.

 

i have problem accessing my shop:

 

Fatal error: Cannot redeclare tep_set_featured_status() (previously declared in /home/avhitnet/public_html/katalog/includes/functions/featured_sets.php:30) in /home/avhitnet/public_html/katalog/includes/functions/featured.php on line 16

 

i had instaled contribution featured products 1.5.2

 

how can i get rid of this problem???

 

thanks in advance

Remember this? I said to remove the one added by this contrib to fix it the error. I'll bet this is your problem with the products features not turning on.

 

Search for the

function tep_set_featured_status

function. And replace the whole function with the one that is in this package, at the bottom of /catalog/admin/includes/functions/general.php

Link to comment
Share on other sites

The only think I can say at this point is to backup your categories.php and replace it with the one in the package, then test. If it works then, keep looking. ;)

 

with original categoriese.php it works. when i compare my categories.php and original in contrib i can't find the difference. it s truth that i have instaled about 400 additional lines in my code, but can't find why it won't work.

 

i think that uploading my categories.php is a little bit insane - about 100k.

 

what to do now. please help because now i know it works :)

 

thanks for other help, i managed to work everything ok.

 

best regards,

Miha

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