Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Choose products for front page my self!


Guest

Recommended Posts

Posted

Hi, I am currently setting up my store, and oscommerce is working great for my needs! I am having problems finding a way to display selected products on the front page. New products are ok, but i also want to show the customer products i want to sell when he enteres the shop, not only new products. Anyone got any ideas what i should do or what contrib would fill my needs!

 

What i am wanting to do with this is customise it so i have 2 products pr row, and maby 5 rows.

Posted
Hi, I am currently setting up my store, and oscommerce is working great for my needs! I am having problems finding a way to display selected products on the front page. New products are ok, but i also want to show the customer products i want to sell when he enteres the shop, not only new products. Anyone got any ideas what i should do or what contrib would fill my needs!

 

What i am wanting to do with this is customise it so i have 2 products pr row, and maby 5 rows.

Featured Products

Richard Lindsey

Posted

 

 

Thanx, that intregreated perfectly and what i was looking for! :D :D :D Anyone have a hint for me on how i get it to show 2 products pr row instead of 3,

Posted
Thanx, that intregreated perfectly and what i was looking for! :D :D :D Anyone have a hint for me on how i get it to show 2 products pr row instead of 3,

You'll have to edit the loop that displays them, most likely in index.php, and change it from displaying 3 per row to 2 per row, it's most likely got a $col variable that keeps track of how many columns it's written out, and has a check at the end of the loop, something like :

 

if (++$col == 2) {

?>

</tr>

<tr>

<?php

}

 

Just change that to 1 number higher I would think...

 

Richard.

Richard Lindsey

Posted
You'll have to edit the loop that displays them, most likely in index.php, and change it from displaying 3 per row to 2 per row, it's most likely got a $col variable that keeps track of how many columns it's written out, and has a check at the end of the loop, something like :

 

if (++$col == 2) {

?>

</tr>

<tr>

<?php

}

 

Just change that to 1 number higher I would think...

 

Richard.

 

Thanx! That did the trick! :D :blush:

Posted

Installing this contribution gave me the following error

 

1146 - Table 'planeth_shop.TABLE_COUNTER' doesn't exist

 

select startdate, counter from TABLE_COUNTER

 

[TEP STOP]

 

This appears on the index and all the other pages. I have checked all the files I modified and added, and i cant see any relationship to this... I guess it is something to do with the sql file i imported. Im fearly new to sql so i couldenent figure out what to do with this..

 

Anyone got a tip/hint for me! :blink:

Posted
Thanx, that intregreated perfectly and what i was looking for! :D :D :D Anyone have a hint for me on how i get it to show 2 products pr row instead of 3,

 

I just found these instructions to adjust the number of rows and colums:

 

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

 

Changing the number of the featured products

 

Q: How do I change the number of featured products on the front page?

 

A: The number of columns shown in the Featured Products section of the front page of the shop can be changed by editing the "includes/modules/new_products.php" file. The number should be changed appropriately. The default is '2', which will show three columns because the counter starts at 0.

 

$col ++;

 

if ($col > 2) {

$col = 0;

$row ++;

}

?>

The following (modified) code will show 2 columns:

 

$col ++;

 

if ($col > 1) {

$col = 0;

$row ++;

}

?>

 

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

 

Courtesy of: Installing Os Commerce Templates - Author: Igor Lognikov, Editor

 

http://www.webdesign.org/web/web-design-ba...ates.11012.html

 

I still need to find a way to assign the products to the front page.....looks like that contribution didn't work. :(

 

I'm currently looking at the "new_products.php" file for this mod.....maybe someone smarter/wiser than I can help. :rolleyes:

Posted

Here is the actual code from my "includes/modules/new_products.php" file:

 

$col ++;

if ($col > 1) {

$col = 0;

$row ++;

if ($row > 2)

break;

 

To change the number of columns (across)...change this number: ($col > 1)

 

To change the number of rows (down)...change this number: ($row > 2)

Posted
Installing this contribution gave me the following error

 

1146 - Table 'planeth_shop.TABLE_COUNTER' doesn't exist

 

select startdate, counter from TABLE_COUNTER

 

[TEP STOP]

 

This appears on the index and all the other pages. I have checked all the files I modified and added, and i cant see any relationship to this... I guess it is something to do with the sql file i imported. Im fearly new to sql so i couldenent figure out what to do with this..

 

Anyone got a tip/hint for me! :blink:

 

 

Whatever recent files you added to your store requires a table in the database to pull from, and obviously the Sql file didnt include that table, either the sql file dropped the table or should have included it.

Posted

I was looking at my database and there is a table called counter.

 

Its between the table configuration_group & counter_history. You may have accidently removed that table from your database when you did your SQl file for your featured products contribution. you might try opening your phpmyadmin interface in your C-panel. See if the table counter exists or not, if it does not then you should be able to click "SQL" heading and copy this code and paste it into the SQL query

 

DROP TABLE IF EXISTS `counter`;
CREATE TABLE IF NOT EXISTS `counter` (
 `startdate` char(8) default NULL,
 `counter` int(12) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

That should create the table you need.

 

Make sure that you also have counter_history in your tables as well

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...