snubbr.com

Why is Verisign SSL v2 more secure than telnet?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
Got a quick question: Why is Verisign SSL v2 more secure than telnet? Many thanks for any answer or 2. Second question.. I was wondering if I could change the number on the front page of my site, from 4 to 6. Meaning 2 columns with 3 rows..

I was looking into the new_products.php module and found the following:.

$col ++;.

If ($col > 2) {.

$col = 0;.

$row ++;.

Now it's been years since I haven't coded but is that the place where it calculates how many rows and columns will be drawn? I did try to play with it a little but all I could do was make it show 2 columns 1 row...

Comments (13)

I would like to know the answer too. Anyone here know what is the answer to your question. I'll do some poking around and get back to you if I got an anything. You should email the people at Verisign as they probably know..

Comment #1

Changeing if ($col > 2) to if ($col > 1) will mean there will be 2 pictures per row. Just remember that whatever number you put in there, there will be 1 more picture than that in your row...

Comment #2

Hmmm what I get from the change above and a change in the New Products Module - max number of new products to display is 3 rows and 2 colms, but only the last row had 2 Items the others had only 1 item in it...

Comment #3

In your admin under configuration->Maximum Values there is a setting called New Products Module. By default it is set to 9. That is 9 products or pictures in your new products for april..

In the above code, if ($col > 2) default code, that will show as 3 pics accross and 3 pics down. 3 rows and 3 colu,ms. If you want 2 pics accross (2 columns) then change if ($col > 2) to a 1. With max 9 pics that will give you 5 rows with 2 pics in the first 4 rows and 1 in the fifth...

Comment #4

Hey thanks for the explanation how the whole thing works. I have left everything by default New Products module - 9 and if ($col > 2) but as you can see on my page.

Http://kartipamet.com.

I see only 2 x 2. It's in Cyrillic so don't worry if it can't be read...

Comment #5

Hi executable..

Sorry to bump in here, but it looks like you are using a similar template to what I'm using....

I have a minor problem with my cart....i checked out your Cart and the 2 problems I seem to be having dont seem to be present in your template, could I ask of you a massive favor and ask you to PM/email me the few files I'm strugling with?.

You can see my topics here:.

Cart not updating:.

Http://forums.oscomm...howtopic=299213.

And.

Buy now button on New products not working:.

Http://forums.oscomm...howtopic=299214.

My cart is here:.

Http://www.directbmx.co.za/catalog/.

This post has been edited by.

Cookie monster.

: 14 April 2008, 20:01..

Comment #6

It's ok I have pm-ed you and replied to both of your topics..

Comment #7

Not sure how templates are set up or work but if youcan post your catalog/includes/modules/new_products.php maybe we can find the solution...

Comment #8

<! new_products //>.

<tr>.

<td>.

<?php.

$info_box_contents = array();.

$info_box_contents[] = array('text' => '<div class="header">'.TABLE_HEADING_NEW_PRODUCTS.'</div>');.

New contentBoxHeading($info_box_contents);.

?>.

<div style="background-color:#FFF;">.

<?php.

If ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {.

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit "MAX_DISPLAY_NEW_PRODUCTS);.

} else {.

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_CATEGORIES" c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '"(int)$new_products_category_id"' and p.products_status = '1' order by p.products_date_added desc limit "MAX_DISPLAY_NEW_PRODUCTS);.

}.

$row = 0;.

$col = 0;.

$info_box_contents = array();.

While ($new_products = tep_db_fetch_array($new_products_query)) {.

$new_products['products_name'] = tep_get_products_name($new_products['products_id']);.

$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, 65);.

$desc_len = strlen($description['products_description']);.

$description['products_description'][$desc_len-1] = '.';.

$description['products_description'][$desc_len-2] = '.';.

$description['products_description'][$desc_len-3] = '.';.

If ( ($col == 1 && $row == 0) || ($col == 1 && $row == 2) ){.

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

'params' => 'width="1" height="100%" valign="middle" ',.

'text' => '<table height="" width="100%" border="0" cellspacing="0" cellpadding="0" >.

<tr>.

<td><div style="width:1px;"></div></td>.

</tr>.

</table>');.

}.

Elseif (($col == 0 && $row == 1) || ($col == 2 && $row == 1)) {.

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

'params' => 'height="1"',.

'text' => '<table width="95%" border="0" cellspacing="0" cellpadding="0" >.

<tr>.

<td style="font-size:1px;background:url(images/points.gif) repeat-x;">&nbsp;</td>.

</tr>.

</table>');.

}.

Elseif ($col == 1 && $row == 1) {.

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

'params' => '',.

'text' => '&nbsp;');.

}.

Else { .

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

'params' => 'class="main" width="50%" valign="top" align="left"',.

'text' => '<table width="96%" cellpadding=0 cellspacing=0 border=0 style="margin-bottom:7px;">.

<tr>.

<td rowspan="2"><a href="'tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$new_products['products_id'])'">'tep_image(DIR_WS_IMAGES$new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="absmiddle"')'</a></td>.

<td height="35" style="padding-right:10px;"><div class="productName">'.$new_products['products_name'].'</div></td>.

</tr>.

<tr>.

<td height="32" ><span style="color:#C20000; font-size:20px; "> '$currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</span></td>.

</tr>.

<tr>.

<td colspan="2" height="1" align="left" style="padding:0px 10px;"><div style="background:url(images/dotted.gif);"><img src="images/dotted.gif" width="3" height="1" alt="" /></div></td>.

</tr>.

<tr>.

<td colspan="2" class="main" valign=top align="right" style="padding-right:10px; >'. tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action'))'action=add_product')).'.

<table width="100%" border="0" cellspacing="0" cellpadding="0">.

<tr>.

<td style="padding-top:1px; padding-right:1px;" ><a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$new_products['products_id']).'">'.tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS).'</a></td><td style="padding-top:1px;"><a href="'tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action'))'action=buy_now&products_id='$new_products['products_id'])'">'tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART)'</a></td>.

</tr>.

</table></form>.

</td>.

</tr>.

</table>'); }.

$col ++;.

If ($col > 2) {.

$col = 0;.

$row ++;.

}.

}.

New contentBox($info_box_contents, 0);.

?>.

</div>.

</td>.

</tr>.

Here it is the whole thing..

Comment #9

Sorry not sure how to change that one. hopefully someone can help you out here...

Comment #10

Seems my carts new_products.php page is also only showing a couple products, I would also like to bump it up to 4 maybe 6 items. I looked around in my new_products.php file and messed around a lil with code (that xecutable mentioned) below but had no luck....but.

$col ++;.

If ($col > 2) {.

$col = 0;.

$row ++;.

I found another area and made some changes thier...its works but I cant figure out what needs to be changed to how much....

I got 3 products in 1 row with a bit of testing, and with a bit more 2 products in the top rom and 1 below where there wasnt one before, but it over laps a little with the footer images..

So it seems to be possible. I just need to spend more time on it to test a few more options. Maybe if one of you guys who know what thier doing can suggest the corect combination....

This from my new_products.php (similar, maybe same as xecutables).

In or around line #50.

If ( ($col == 1 && $row == 0) || ($col == 1 && $row == 2) ){.

In or around line #59.

Elseif (($col == 1 && $row == 2) || ($col == 2 && $row == 2)) {.

Ive left t as is for now on my site:.

Http://directbmx.co.za/catalog.

, reflecting the changes I made...

Comment #11

I think I changed the Max number of items displayed in category from 9 to 10 or 11 and it gave the same result, 3 in column 1 and 2 in column 2 but was never able to get it 3 by 3..

Comment #12

Hello.

What I have done to get 2 col x 4 row like this:.

[_][_].

[_][_].

[_][_].

[_][_].

I changed "Maximum values > New Products Module" = 25..

In "catalog/includes/modules/new_products.php".

In or arround line 23 - 24:.

$row = 4;.

$col = 0;.

$col ++;.

If ($col > 1) {.

$col = 0;.

$row ++;.

}.

But still have a small problem, it will not show the latest new product untell you add new one. whech means one new product will be missing from the new_products..

Hope that will help anyone somehow...

Comment #13

2 COLUMN with 3 ROWS:.

STEP#1.

Find this code:.

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit "MAX_DISPLAY_NEW_PRODUCTS);.

} else {.

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_CATEGORIES" c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '"(int)$new_products_category_id"' and p.products_status = '1' order by p.products_date_added desc limit "MAX_DISPLAY_NEW_PRODUCTS);.

Replace with:.

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit "6);.

} else {.

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from "TABLE_PRODUCTS" p left join "TABLE_SPECIALS" s on p.products_id = s.products_id, "TABLE_PRODUCTS_TO_CATEGORIES" p2c, "TABLE_CATEGORIES" c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '"(int)$new_products_category_id"' and p.products_status = '1' order by p.products_date_added desc limit "MAX_DISPLAY_NEW_PRODUCTS);.

STEP #2.

Find for code:.

}.

$col ++;.

If ($col > 2) {.

$col = 0;.

$row ++;.

}.

Replace with:.

$col ++;.

If ($col > 1) {.

$col = 0;.

$row ++;.

}.

}.

Please Note:.

You see that closing sign ".

}.

" before $col ++;.

Cut and paste under sign.

}.

I hope this can help you all.....

Comment #14


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.