Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Individual boxes for products in central modules - cajas individuales para productos de modulos centrales


nicko107

Recommended Posts

Hi Get-Wireless 2,

 

I have sent you a PM. Maybe you can help me because your shop has working borders (Individual boxes v1.1). Hope so!

 

For others:

 

see my problem @ MyShop

 

I can't get all boxes to get the same border.

snap20061208093204sc6.gif

 

I executed these instructions:

 

* 11.1. OPEN File and FIND:
*
<!-- body_text //-->
*
* ADD AFTER:
*
<?php echo mws_header (''); ?>
*
* 2. FIND:
*
<!-- body_text_eof //-->
*
* ADD BEFORE:
*
<?php echo mws_footer (''); ?>

But it does not seem to work for me! Maybe someone can post working php files? Those should be, if I'm correct:

  • catalog/stylesheet.css
  • catalog/includes/classes/boxes.php
  • catalog/includes/languages/english.php (or other language)
  • catalog/includes/modules/new_products.php
  • catalog/includes/modules/also_purchased_products.php
  • catalog/specials.php

 

 

Hi JW75

 

For applied the graphical borders to the columns boxes is other contribution that do that

 

See contribution:

 

Graphical Borders

 

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

 

 

Use the instructions of version: Graphical Borders v2.1 of 22 november

 

you only need to do that changes of this contribution and all of the boxes of columns modified automatically

 

if you applied the instructions of Individual boxes to any of the boxes then restore that files and do the modification of Graphical borders on it

 

 

The instructions indicate where are the same steps in both contributions and made easy for install both

 

 

 

This contribution Individual boxes is for main modules ( new_products.php module, also purchased module and the list of special products) to display the products of thats modules in individual boxes and with the borders of contribution Graphical borders

Link to comment
Share on other sites

  • Replies 76
  • Created
  • Last Reply

Top Posters In This Topic

Hi JW75

 

For applied the graphical borders to the columns boxes is other contribution that do that

 

See contribution:

 

Graphical Borders

 

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

Use the instructions of version: Graphical Borders v2.1 of 22 november

Hi nicko107,

 

It worked! Looks sweet now :P

 

But see my other post: can't get everything to work!

Link to comment
Share on other sites

Hi

 

 

I revised the instructions to integrate the contributions:

 

* Featured Products 1.5.8 or 1.5.9

 

* Specials on Default 3

 

with the new version Individual Boxes 1.2

 

 

I reppack the install instructions with fixes in code and instructions

 

and added a NEW FEATURE: instructions to APPLIED individual boxes TO THE PAGE THAT LISTED ALL FEATURED PRODUCTS (but in this version I only can adapted this page to display products in individual rounded borders and for display one product per row.

 

 

I upload new version of:

 

Addons to 1.2 - integration Individual boxes 1.2 with Featured Products and/or Specials on

 

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

 

 

This instructions applied the individual boxes with graphics rounded borders to:

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

 

* Featured Products module

 

* Page that listed all the featured products: >> NEW IN THIS VERSON

 

* Specials on Default.php module

 

 

- add individual boxes with rounded graphics borders

- display 2 products by column, (is possible configure it in files to display 3) (only 1 for the page of featured products)

- add short description

- add a "more info+" link to the product detailed page, and maintains it in product name too.

- add a cart icon with link to add the product to shopping cart, (in products with atributtes redirect to the detailed product page)

- add a "FEATURED" / "SPECIAL" tag with link to the page that listed the all featured products / specials products.

 

 

Include separate instructions for each contribution

 

 

SEE THE SCREENSHOTS INCLUDE

 

Include UPDATE instructions to update "FEATURED PRODUCTS" / "SPECIALS ON DEFAULT" with version 1.1 to 1.2

 

 

Include files with modifications to upload directly and only have to do some modifications to integrates this contributions with individual boxes

 

 

Regards

nicko107

Link to comment
Share on other sites

This is the Page that listed all featured products with the Individual Boxes 1.2 integrated:

 

featuredproductpageskinrv7.png

 

modified with:

 

Individual Boxes 1.2

and:

Addons to 1.2 - integration Individual boxes 1.2 with Featured Products and/or Specials on Default

 

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

Link to comment
Share on other sites

Thanks for the upadate to product info page Nicko :thumbsup:

 

all working fine.

 

Is there a way to show it in 2 rows or columns ...like the specials page ?

 

 

Hi

 

I couldnt modified it to display two columns

I hope I could find how to do that

perhaps someone with better knowledge of PHP can do that

Link to comment
Share on other sites

Hi

 

I upload a new pack with integration instructions of individual boxes with "Product Listing in Columns" contribution.

 

This pack called:

 

"Addons for 1.2 - integration Individual boxes 1.2 with Product Listing in Columns contribution.

 

date: december 16 of 2006

 

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

 

 

 

This pack add instructions of how to display the products in product listing with individual rounded borders,

this is for the version:

"v2.2 With clean install instructions" by djmonkey1 of date 19 Jun 2006

of "Product Listing in Columns" contribution (http://www.oscommerce.com/community/contributions,112)

 

First is necessary the installation of Individual boxes 1.2, and need the installation of "Product Listing in Columns" contribution for display the products in columns

 

 

Include extra instructions for display the short description and "more info+" link in product box.

Screenshots, instructions in english and spanish and the file product_listing_col.php with all changes

 

 

NOTE: In pack I add the product_listing_col.php with all modifications to display the individual boxes with graphics borders and short description but I forget to add the file that include only the individual boxes without the short description, I dont upload other pack for dont confuse.

 

 

 

pack include screenshot,

this is the result with individual boxes:

 

productlistcolibku0.png

 

 

and the next is the result with individual boxes and the short description and "more info+" link:

 

productlistcolibdesc2cdm1.png

Edited by nicko107
Link to comment
Share on other sites

I got this up fine, but in the product description instead of it there is just the text:

x229667484which_image_loaded = 0;x229667484image...Read more...

 

www.homegrownglass.com/store check it out yourslef. Any help?

 

 

Hi

 

is possible your store use other variable for product description instead the default osCommerce: products_description

 

this could be the reason for dont display the short description,

 

the short description querie added to file is this:

 

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);		
$description['products_description'] = substr($description['products_description'], 0, 150);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';

$description['products_description'] = ereg_replace("(Array)", "", $description['products_description']);

 

if you use other variable then you have to change the first line

 

 

you have to find what variable used for the description of products

 

and then try to do this modification in the first line of this code:

 

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id;

 

replace this products_description in bold with the variable used by your catalog

Link to comment
Share on other sites

I got this up fine, but in the product description instead of it there is just the text:

x229667484which_image_loaded = 0;x229667484image...Read more...

 

www.homegrownglass.com/store check it out yourslef. Any help?

 

 

Do you use images in your product description as this can cause no description to show up.

 

This happens on my website as a use a html editor and if i insert an image then no short description will show up in product listing but if no image was used then it shows up.

Link to comment
Share on other sites

  • 2 weeks later...

Also another problem that i have,

I also install "Product Listing in Columns Contribution" for Individual boxes for products...

And it's working great, my problem is that i not every box have the same height ...

As u can see:

problem.jpg

 

What can I do in order to fix it?

 

thx,

holyone.

Link to comment
Share on other sites

  • 2 weeks later...

hi

first ...sorry for my english.

I added this contribuition, and it was working fine. Today , i installed the other stuff, products_features, and every other modules , but the problem is that now , the product description, does not break the lines. It goes on and on.

 

how do i fix this ?

 

Thank´s

Link to comment
Share on other sites

hi

first ...sorry for my english.

I added this contribuition, and it was working fine. Today , i installed the other stuff, products_features, and every other modules , but the problem is that now , the product description, does not break the lines. It goes on and on.

 

how do i fix this ?

 

Thank´s

 

 

try and find this line in the module. it will appear twice , so change both

 

 

$description['products_description'] = substr($description['products_description'], 0, 150);

 

 

the 150 bit is the length of the description. have a look and see what yours is set at

Edited by andytc
Link to comment
Share on other sites

thank you for your replay.

I already change thoes to minor numbers.

 

$description['products_description'] = substr($description['products_description'], 0, 150);

 

But if i have a small number it will be ok. but the product description will be also to small.

The problem it´s i don´t know why, the product's description stay's in just one line, it doesn´t break...

 

Not just in the modules but also in the page specials.php, and everything else.

Yesterday was fine, today i install products_features, and the default_specials modules, and features modules, within several contribuitions, and now i´m in a deep hole.

 

It was the last thing, i was going to put in my store....

I have HTML_area contribution , i already remove it , but it stay's the same.

Something width the mysql ?

 

I don´t really know much of php, but what is the code that splits's the product description ?

 

 

Thank´s.

Link to comment
Share on other sites

hi

it´s something i db , i didn´t resolve it , but i made i backup, and now it´s working fine(the product_description), tomorow i will see what´s missing now...

 

Thank you very much.

Link to comment
Share on other sites

hi,

Well i´m lost , don´t know what to do ...

I made a restore of the DB, and it appears that i fixed the problem , but no...

After i made the restore, i had to incert into the DB this things :

 

This belongs to Featured_Products_v1.5.9 contribution.

 

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('39','Destaques', 'Exibir Destaques', '339', '1'
);

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Exibir destaques', 'FEATURED_PRODUCTS_DISPLAY', 'true', 'Ativar o módulo destaques (true) ou não (false)', '39', '1', now(), now()
);

INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Numero maximo de destaques', 'MAX_DISPLAY_FEATURED_PRODUCTS', '6', 'Numero maximo de destaques a ser exibidos na pagina inicial', '39', '2', now(), now()
);

 

 

Specials_on_Default_3.0

 

INSERT INTO `configuration` VALUES ('', 'Specials Products Module', 'MAX_DISPLAY_SPECIALS_PRODUCTS_MODULE', '3', 'Maximum number of specials product to display in main module.', 3, 5, NULL, now(), NULL, NULL);

INSERT INTO `configuration` VALUES ('', 'Show Default Specials on Main Page', 'SHOW_DEFAULTSPECIALS', 'true', 'Show Default Specials on Index Page', '', NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES ('', 'Show Default Specials on Categories Page', 'SHOW_DEFAULTSPECIALS_CATEGORY', 'true', 'Show Default Specials on categories with subcategories', '', NULL, now(), now(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

 

 

product-tabsv1-5 Contribution

 

ALTER TABLE `products_description` ADD `products_spec` TEXT DEFAULT NULL AFTER `products_description`;
ALTER TABLE `products_description` ADD `products_musthave` TEXT DEFAULT NULL AFTER `products_description`;
ALTER TABLE `products_description` ADD `products_extraimage` TEXT DEFAULT NULL AFTER `products_description`;
ALTER TABLE `products_description` ADD `products_manual` TEXT DEFAULT NULL AFTER `products_description`;
ALTER TABLE `products_description` ADD `products_extra1` TEXT DEFAULT NULL AFTER `products_description`;
ALTER TABLE `products_description` ADD `products_moreinfo` TEXT DEFAULT NULL AFTER `products_description`;

 

I also have HTML AREA contribution, but i remove it , but stay´s the same.

Now, after making this changes, the products that are in the DB, it stay's fine, no problem...

When i insert a new product or change the description, then it doens't break the lines, of product decription anymore.

 

I leave you the link to the page, because it show´s exactly what i´m saying....scroll down and you will see a memory description ....

 

Link to the page

 

Thank´s!

Link to comment
Share on other sites

well, i think i resolve it

Something to do width the language_id. Don´t ask me why, but as i set my language to portuguese, the language id in the DB was 4, i change the language_id to 1, anda everything else that had language_id in the DB to 1 also . And Now it´s working fine.

 

Thank´s anyway

Link to comment
Share on other sites

  • 2 weeks later...
Hello,

I have in my oscommerce this:

- Graphical Borders

- Individual Boxes

- X-Sell

 

I don't know how to make X-Sell, look like "Also purchased products..."!!

Can someone please tell me how?

 

kindly,

holyone.

 

 

Hi

 

this are the steps to integrate "X-Sell v2.2" with "Individual Boxes 1.2":

 

 

1. Edit file:

 

catalog/includes/modules/xsell_products.php

 

Find:

 

	 new contentBoxHeading($info_box_contents);

 

Replace:

 

//	 new contentBoxHeading($info_box_contents);

 

(this hide the default header of the module)

 

 

2. In the same file find this line:

 

	   $info_box_contents[$row][$col] = array('align' => 'center',

 

ADD BEFORE:

 

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='. $xsell['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);		
$description['products_description'] = substr($description['products_description'], 0, 150);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';

$description['products_description'] = ereg_replace("(Array)", "", $description['products_description']);

 

(this is for add the query for product description and create the short description)

 

 

3. the second is create the individual boxes:

 

In the same file find:

 

	   $info_box_contents[$row][$col] = array('align' => 'center',
										  'params' => 'class="smallText" width="33%" valign="top"',
										  'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br><a href="' . tep_href_link(basename($PHP_SELF), 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>');

 

Replace:

 

	   $info_box_contents[$row][$col] = array('align' => 'center',
										  'params' => 'class="smallText" cellspacing="0" width="50%" valign="top"',
										  'text' => '<table width="99%" border="0" cellspacing="0" cellpadding="0">
 <tr>
<td align="right" valign="bottom" bordercolor="0"><img src="images/infobox_module/upper_left.gif" width="14" height="33" /></td>	
<td colspan="2" background="images/infobox_module/top.gif" class=mws_boxTop_module><a class=productTitle href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . substr($xsell['products_name'], 0, 30) .'</a></td>
<td align="left" valign="bottom"><img src="images/infobox_module/upper_right.gif" width="14" height="33" /></td>
 </tr>
 <tr>
<td background="images/infobox_module/left.gif" width="14"> </td>
<td align="center" class=mws_boxCenter_module><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> </td>
<td class=mws_boxCenter_module2>'. strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']). '"><b>' . DESCR_READ_MORE . '</b></a><br><br><a href="' . tep_href_link(basename($PHP_SELF), 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('cart_buy.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a> <strong>' . $xsell_price . '</strong></td>
<td background="images/infobox_module/right.gif" class="smallText" width="14"><img src="images/infobox_module/right.gif" width="14" height="149" /></td>
 </tr>
 <tr>
<td align="right" valign="top"><img src="images/infobox_module/lower_left.gif" width="14" height="12" /></td>
<td colspan="2" background="images/infobox_module/bot.gif"><img src="images/infobox_module/bot.gif" width="2" height="12" /></td>
<td align="left" valign="top" class="smallText"><img src="images/infobox_module/lower_right.gif" width="14" height="12" /></td>
 </tr>
</table><br>');

 

(the code use for buy button the code of x-sell)

 

 

4. Find this line:

 

	   if ($col > 2) {

 

Replace:

 

	   if ($col > 1) {

 

(this is for change the columns products to show 2 columns)

 

 

 

5. Find this line:

 

	 new contentBox($info_box_contents);

 

replace:

 

	 new noborderBox($info_box_contents);

 

(this is for hide the default border of the module)

 

 

Finish.

 

 

 

 

 

For integrate with others modules:

is similar for steps 1,4 and 5

in step 2 for other module change the $xsell for the variable of the other module

Step 3 is more difficult but it only needed to compare code

first the params change to 50%: 'params' => 'class="smallText" cellspacing="0" width="50%" valign="top"',

and the base table is:

xsell

<table width="99%" border="0" cellspacing="0" cellpadding="0">
 <tr>
<td align="right" valign="bottom" bordercolor="0"><img src="images/infobox_module/upper_left.gif" width="14" height="33" /></td>	
<td colspan="2" background="images/infobox_module/top.gif" class=mws_boxTop_module>here is for the product name code</td>
<td align="left" valign="bottom"><img src="images/infobox_module/upper_right.gif" width="14" height="33" /></td>
 </tr>
 <tr>
<td background="images/infobox_module/left.gif" width="14"> </td>
<td align="center" class=mws_boxCenter_module>here the product image and the module tag (NEW, SPECIALS,...)</td>
<td class=mws_boxCenter_module2>here is for the short description, more info link, price,... </td>
<td background="images/infobox_module/right.gif" class="smallText" width="14"><img src="images/infobox_module/right.gif" width="14" height="149" /></td>
 </tr>
 <tr>
<td align="right" valign="top"><img src="images/infobox_module/lower_left.gif" width="14" height="12" /></td>
<td colspan="2" background="images/infobox_module/bot.gif"><img src="images/infobox_module/bot.gif" width="2" height="12" /></td>
<td align="left" valign="top" class="smallText"><img src="images/infobox_module/lower_right.gif" width="14" height="12" /></td>
 </tr>
</table><br>

comparing the code with others modules integrated with Individual boxes made easy to create the code to insert in the table.

 

 

regards

Link to comment
Share on other sites

thank you for your replay.

I already change thoes to minor numbers.

 

$description['products_description'] = substr($description['products_description'], 0, 150);

 

But if i have a small number it will be ok. but the product description will be also to small.

The problem it´s i don´t know why, the product's description stay's in just one line, it doesn´t break...

 

 

Hi

 

Then try to change this:

 

in this file:

 

catalog/includes/modules/product_listing_col.php

 

find this line:

 

<img src="images/infobox_module/right.gif" width="14" height="149" />

 

 

increse the number 149 to 155 or other bigger to change the size of the box

 

this define a minimun size of the internal of box and can help when the boxes have different high

 

 

 

regards

Link to comment
Share on other sites

Hi Nicko

 

Do you have the code for the in stock / out of stock buttons for the front page modules ?

 

Star product

Featured

specials on default

 

I have all the others working fine , but not the stock buttons on front page.

 

would be a big help to me :)

Link to comment
Share on other sites

Hello,

First of all, I really love your contributions. I am using a few of them. I am working to get my store up by Feburary and have just one problem-

Have several mods added to my store:

Loginbox Best, Specials Scroll Vertical, Show sub categories, Individual boxes for products, and graphical borders. Last one I installed was the indiv boxes for products. I tested each mod and everything was working fine but now, when I click on a category header I go to the page showing items for that category but if I click on a sub-category it goes to blank page. I can click on any item shown under specials or new products and will go to the item page...

Not sure what happened. I have relooked at install instructions of all mods and can not find where I went wrong.

Here is my site, perhaps you could help me figure it out?

My Webpage

Any help is greatly appreciated.

Pattie

Link to comment
Share on other sites

Hello,

First of all, I really love your contributions. I am using a few of them. I am working to get my store up by Feburary and have just one problem-

Have several mods added to my store:

Loginbox Best, Specials Scroll Vertical, Show sub categories, Individual boxes for products, and graphical borders. Last one I installed was the indiv boxes for products. I tested each mod and everything was working fine but now, when I click on a category header I go to the page showing items for that category but if I click on a sub-category it goes to blank page. I can click on any item shown under specials or new products and will go to the item page...

Not sure what happened. I have relooked at install instructions of all mods and can not find where I went wrong.

Here is my site, perhaps you could help me figure it out?

My Site

Also I see where you have added the shop by price on your demo store, what code did you change to get it to show $10 instead of $10.00?

Any help is greatly appreciated.

Pattie

Link to comment
Share on other sites

Hi nicko, thanks for your work.

I need help with this.. error

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&& language_id=1' at line 1

 

SELECT `products_description` FROM `products_description` WHERE products_id = && language_id=1

 

What is that??

 

Rey Castillo

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