Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with the location of the codes...


Eyesofeve

Recommended Posts

Posted

Hello all,

 

In my oscommerce home page, its defaulted to display all the products after I uploaded the pictures.

Can somebody please tell me where is the location to those images Inside the "new products for july" box right on my homepage. Please show me exactly where it is.. like if its in Index.php ...which line is it in?? Thanks So much!

Posted

Eve,

 

On a NEW install of OSC RC2a in the catalog>index.php file on line 111 you will find the NEW PRODUCTS MODULE code as below:

 



// needed for the new products module shown below
$new_products_category_id = $current_category_id;
?>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
	  </tr>
	</table></td>
  </tr>
</table></td>
<?php
 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
					 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
					 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
					 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
					 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
					 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
					 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
					 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
  if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'PRODUCT_LIST_MODEL':
	  $select_column_list .= 'p.products_model, ';
	  break;
	case 'PRODUCT_LIST_NAME':
	  $select_column_list .= 'pd.products_name, ';
	  break;
	case 'PRODUCT_LIST_MANUFACTURER':
	  $select_column_list .= 'm.manufacturers_name, ';
	  break;
	case 'PRODUCT_LIST_QUANTITY':
	  $select_column_list .= 'p.products_quantity, ';
	  break;
	case 'PRODUCT_LIST_IMAGE':
	  $select_column_list .= 'p.products_image, ';
	  break;
	case 'PRODUCT_LIST_WEIGHT':
	  $select_column_list .= 'p.products_weight, ';
	  break;
  }
}

 

There are contributions to replace this box with 'Featured Products' or 'Random Products' if you are looking to change the front page. I hope this helps........

 

 

 

Chris

Posted

Thanks Chris,

 

Could you also tell me which contributions I can choose from? are these templates and themes contributions? ..sorry..very new at this...

Posted

Eve,

 

Here are some contributions you can choose from. They typically only change the 'New Products' area on the index page and are not considered templates. That's a whole other ball game.

 

http://addons.oscommerce.com/info/651 <~featured products

 

http://addons.oscommerce.com/info/3410 <~~~random products

 

 

 

Good Luck, and don't forget to back up your files before installing a contribution........sounds like something someone would do automatically, but you would be surprised how many people don't.

 

 

Chris

Posted

Thanks again chris.

 

Just another question..

What If i want to get rid of the new products images and put a image of my own.

Do i just delet the NEW PRODUCTS MODULE code which you had linked in your previous post, and write in the html image code ..or?

 

THanks so much for your help again!!

Posted

If your going to feature just ONE product on the index page, you could use:

 

http://addons.oscommerce.com/info/2255

 

Otherwise, you can remove the whole section and put your own information or picture in that place. I wouldn't delete the code...but, you can comment it out. Just in case you want to use it in the future.

 

 

Chris

Posted

Thanks again chris,

 

I still need your help...

Please let me know what I M doing wrong...

 

1st. I tried to removed the whole section in index.php (from line 111 - 169)

and i put in " <A HREF="http://www.eyesofeve.com"><IMG SRC="home page layout.jpg" ALT="Home"></A>"

to have my own image. ( I have already uploaded the image to my File Manager

/homepages/22/d247121980/htdocs/catalog//images )

 

It didn't work... an Error came up when i visited my page saying.....Parse error: syntax error, unexpected '<' in /homepages/22/d247121980/htdocs/catalog/index.php on line 113

 

2nd. I DLed the contribution and put the file in File Manager

/homepages/22/d247121980/htdocs/catalog//includes/modules

I didn't really know what to do after that so I went back to my index.php and removed line 111-169 and Copy and pasted the file inside "star-product.php" . Still didn't work.

I got the same error message..

 

Please tell me what I m doing wrong..

Thanks !!!!

Archived

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

×
×
  • Create New...