Jump to content
Sign in to follow this  
surfalot

[Contribution] Specials_Module

Recommended Posts

Abstract:

 

Want to display your specials in the center (main) area instead of just one at

a time in a sidebar box? With this you can.

 

This contribution is designed to put a products special box above

the New Products box on the main page and product info pages and also

after the product listing in the product categories browser. Each location

can be switched on or off in the osC Administrator -> Configuration -> Specials Module

You can specify the number of columns to display and the maximum number

of specials to display in the osC Administrator.

 

Get it here:

http://www.oscommerce.com/community/contributions,4010

Edited by surfalot

Share this post


Link to post
Share on other sites

Cool module, really easy to install and manipulate, thanks for your hard work!

 

One small problem, the box shows fine and works great except for their is no title on the box. Shouldn't it say "Specials" at the top as a clickable link to specials? For some reason mine does not... Any ideas??

 

Always greatful...

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

It should. Maybe you forgot to add the last instruction in the install file, or put it in the wrong place?

 

OPEN catalog/includes/languages/english.php

 

Add to end just before the last ?> line

 

// BEGIN Specials Module

define('TABLE_HEADING_PRODUCT_SPECIALS', 'Specials');

// END Specials Module

Edited by surfalot

Share this post


Link to post
Share on other sites

Thanks for the reply. No, I put it in there. I will go check to be sure, but I checked many times last night. Thanks

 

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Hmmm, The line is in the english file just as instructed. I even reuploaded the file. Still nothing!!!!????

 

Any other ideas?

 

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Doah! I didn't include the stylesheet change in the instructions, sorry. do the following change, then download the latest update I posted to the contrib and replace your /catalog/includes/module/product_specials.php file.

 

Open File:

 

/catalog/stylesheet.css

 

Find:

 

TD.infoBoxHeading {

 

Change to:

 

TD.infoBoxHeading,

/* BOF: Added for Links in Infobox Headings */

TD.infoBoxHeading A,

TD.infoBoxHeading A:hover {

/* EOF: Added for Links in Infobox Headings */

Share this post


Link to post
Share on other sites
Doah! I didn't include the stylesheet change in the instructions, sorry. do the following change, then download the latest update I posted to the contrib and replace your /catalog/includes/module/product_specials.php file.

 

Open File:

 

/catalog/stylesheet.css

 

Find:

 

TD.infoBoxHeading {

 

Change to:

 

TD.infoBoxHeading,

/* BOF: Added for Links in Infobox Headings */

TD.infoBoxHeading A,

TD.infoBoxHeading A:hover {

/* EOF: Added for Links in Infobox Headings */

 

 

Ok I have done everything this post instructs.

I still have no "Specials" title on the box!!??

Anymore ideas?

 

Thanks

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Got it sorted...

In product_specials.php

I added this at line 36:

new contentBoxHeading($info_box_contents);

right after this:

$info_box_contents = array();

$info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'" class="links">'.sprintf(TABLE_HEADING_PRODUCT_SPECIALS, strftime('%B')).'</a>' );

 

Works great!

Moon

Edited by moonbeam

"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites

Thanks for reporting back.

 

You can remove the infoBoxHeading() class call that follows that. There must be something funny going on with your infoBoxHeading() class/function.

 

I noticed in your post that you didn't get the new file from the 1.0a version uploaded. This is how the new file reads.

	$info_box_contents = array();
$info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'">'.TABLE_HEADING_PRODUCT_SPECIALS.'</a>' );

new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS));

I see that the infoBoxHeading() function was not displaying the link it was sent. Anyway, contentBoxHeading() is just fine too. Featured Products uses it, I think I'll change that code to use contentBoxHeading() in the next update. infoBoxHeading() was intended to be used in the side boxes, but it shouldn't have mattered which is used for the box header.

Share this post


Link to post
Share on other sites
Thanks for reporting back.

 

You can remove the infoBoxHeading() class call that follows that. There must be something funny going on with your infoBoxHeading() class/function.

 

I noticed in your post that you didn't get the new file from the 1.0a version uploaded. This is how the new file reads.

	$info_box_contents = array();
$info_box_contents[] = array('text' => '<a href="'.tep_href_link(FILENAME_SPECIALS).'">'.TABLE_HEADING_PRODUCT_SPECIALS.'</a>' );

new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS));

I see that the infoBoxHeading() function was not displaying the link it was sent. Anyway, contentBoxHeading() is just fine too. Featured Products uses it, I think I'll change that code to use contentBoxHeading() in the next update. infoBoxHeading() was intended to be used in the side boxes, but it shouldn't have mattered which is used for the box header.

 

You know, I did get your new version loaded. However it didn't fix my problem. So I ended up reverting back to the original because I had previously made some progress with it. Featured products is where I got the idea. At anyrate it's good to go now! Thanks for your hard work, this contribution is one I have wanted for a very long time.

 

Always greatful,

Moon


"Woohoo, Just Havin Funnn!"

Share this post


Link to post
Share on other sites
Guest

Great contribution!! Works like a charm...I've been trying to figure out how to change the look of only that center specials box...for example...remove the box look...no border.

Thanks Again

Share this post


Link to post
Share on other sites

Hi Surfalot,

 

I installed your Specials_Module 1.0a last night which appears to be working fine however now I have what appear to be duplicate entries in the Specials Module Admin Configuration page. I am still learning so I may have done something stupid or miss reading something.

 

This is what I have listed.

 

Limit the Scope of Specials Shown true

Show Specials on Catalog Page true

Show Specials on Categories Page true

Show Specials on Products Info Page true

Show Specials on Products List Pages true

Product Specials Columns 3

Max Product Specials 3

Limit the Scope of Specials Shown true

Show Specials on Catalog Page true

Show Specials on Categories Page true

Show Specials on Products Info Page true

Show Specials on Products List Pages true

Product Specials Columns 3

Limit the Scope of Specials Shown true

Max Product Specials 3

Show Specials on Catalog Page true

Show Specials on Categories Page true

Show Specials on Products Info Page true

Show Specials on Products List Pages true

Product Specials Columns 3

Max Product Specials 3

Limit the Scope of Specials Shown true

Show Specials on Catalog Page true

Show Specials on Categories Page true

Show Specials on Products Info Page true

Show Specials on Products List Pages true

Product Specials Columns 3

Max Product Specials

 

 

Cheers

i.t.gadgets

Share this post


Link to post
Share on other sites
remove the box look...no border.

 

OPEN: catalog/includes/modules/products_specials.php

 

find:

 

new infoBoxHeading($info_box_contents,false,false, tep_href_link(FILENAME_SPECIALS));

 

replace with the following if you still want a title, otherwise just remove it. format as needed.

 

echo $info_box_contents[0]['text'];

 

Find:

 

new contentBox($info_box_contents);

 

replace with:

 

new tableBox($info_box_contents, true);

 

presto! no box!

Share this post


Link to post
Share on other sites
duplicate entries in the Specials Module Admin Configuration page.

Sounds like you ran the SQL a few times, or double-clicked the Go button.

 

run this in your phpMyAdmin (or other SQL tool):

 

DELETE FROM `configuration` WHERE `configuration_group_id` = 6123;
INSERT INTO `configuration` VALUES ('', 'Limit the Scope of Specials Shown', 'LIMIT_PRODUCT_SPECIALS_SCOPE', 'true', 'Show only Product Specials that are under the current category level.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES ('', 'Show Specials on Catalog Page', 'SHOW_PRODUCT_SPECIALS_ON_CATALOG', 'true', 'Show Product Specials at the bottom of the Main Catalog Page', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES ('', 'Show Specials on Categories Page', 'SHOW_PRODUCT_SPECIALS_ON_CATEGORIES', 'true', 'Show Product Specials at the bottom of the Categories Page. Shown only on pages without a products list also.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES ('', 'Show Specials on Products Info Page', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS', 'true', 'Show Product Specials at the bottom of the Products Info pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES ('', 'Show Specials on Products List Pages', 'SHOW_PRODUCT_SPECIALS_ON_PRODUCTS_LIST', 'true', 'Show Product Specials at the bottom of the Products List pages. This is best suited for column/row product list pages.', 6123, NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES ('', 'Product Specials Columns', 'PRODUCT_SPECIALS_DISPLAY_COLUMNS', '3', 'Number of columns to display product specials.', 6123, NULL, now(), now(), NULL, NULL);
INSERT INTO `configuration` VALUES ('', 'Max Product Specials', 'MAX_DISPLAY_PRODUCT_SPECIALS', '3', 'Maximum number of product specials to display in a category.', 6123, NULL, now(), now(), NULL, NULL);

Share this post


Link to post
Share on other sites

people..

i ve installed the addon..

it work as it should..

but i can't find the 'admin' page where i can set all those things :blush:

where it is?

Share this post


Link to post
Share on other sites

If you ran the SQL script, it is in your admin->configuration->Specials Module

 

Should be at the top of the list of items in your Configuration groups.

 

See the next post if you want to move it to the bottom of that configuration groups...

Share this post


Link to post
Share on other sites

I just noticed the SQL install is placing the Specials Module at the top of the list of Configuration groups in the admin. If anyone wants to push it to the bottom, run this SQL. Make sure the number in `sort_order` = '50' is higher then the highest sort order already there.

 

UPDATE `configuration_group` SET `sort_order` = '50' WHERE `configuration_group_id` =6123 LIMIT 1;

Edited by surfalot

Share this post


Link to post
Share on other sites
If you ran the SQL script, it is in your admin->configuration->Specials Module

 

Should be at the top of the list of items in your Configuration groups.

 

See the next post if you want to move it to the bottom of that configuration groups...

:blush: thanx

Share this post


Link to post
Share on other sites

Hello.

Sorry to ask this here, but I didn't find another place to my question.

 

I would like to have another box of Specials Products, but edited separately.

So, I would have Specials and Specials 2 to have products of the day, etc. in the last one.

 

Any chance of doing this?

Share this post


Link to post
Share on other sites

I think you are looking for a featured products type thing. There are a few featured products contribs available.

Share this post


Link to post
Share on other sites

I 2 problems when installing this. firstly editing the .css file made all the infoboxes sod up. in the end i uploaded the orginal.

 

And this one

 

specials.jpg

 

The best sellers and the specials become 1

 

 

whats ibp image??

Edited by Pilly

Share this post


Link to post
Share on other sites
whats ibp image??

sorry, don't know.

firstly editing the .css file made all the infoboxes sod up. in the end i uploaded the orginal.

You must have missed something there. maybe a brace was out of place.

Share this post


Link to post
Share on other sites

hi

I were install the "Specials_Module", it works wonderful,but I had one problem.

I were install the "sppc" too. So, the file named "product_specials.php" show the price were not right.

 

How can I do? Please help me!

 

thanks very much!

sophina

Share this post


Link to post
Share on other sites
I were install the "sppc" too. So, the file named "product_specials.php" show the price were not right.

i don't know what "sppc" is. can you be more specific?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×