Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error!


sjhnjah

Recommended Posts

Now I've done it. I have a parse error on the last line where you see ['manufacturers_name'] I was trying to get rid of the lines under my products that say Date added:

and Manufactures Name:

Couldn't make it work by deleting the last two lines, so I was trying to put it back like it was until I could study it more, now I can't seem to get the syntax correct. This would be a two fold question if anyone could help me (1) Get my page to reload correctly without the parse error

and what would even be greater, :roll: (2) Tell me how to get rid of the Date added: and Manufacturer: lines under new product, which was my original mission.

{

$products_new_array[] = array('id' => $products_new['products_id'],

'name' => $products_new['products_name'],

'image' => $products_new['products_image'],

'price' => $products_new['products_price'],

'specials_price' => $products_new['specials_new_products_price'],

'tax_class_id' => $products_new['products_tax_class_id'],

'date_added' => tep_date_long($products_new['products_date_added'],

'manufacturer' => $products_new['manufacturers_name']);

}

 

Any help would be very much appreciated!

Sarah

A newbie who has learned just enough to be dangerous!

Link to comment
Share on other sites

Sarah,

 

Wouldn't it be easier to load your backup file to replace the messed up one? Also, it would be ever so much easier to help if you told us which file you are modifying.......

Link to comment
Share on other sites

Linda, Linda, Linda, What shall we do with me? I forgot I had a backup I was in such a panic. Jason helped me out with the parse error and that's now fixed. The file I was working on was Products_New.php I was trying to eliminate the Date added: and the Manufacturer: lines under the product picture and name. Is this the file to make this change or can you give me hint?

Thanks a bunch for your help. I'm learning so much and having so much fun doing so.

:lol: Sarah

A newbie who has learned just enough to be dangerous!

Link to comment
Share on other sites

Sarah,

 

I'm Kim....but, that's ok......

 

In catalog/includes/MODULES is another file called products_new.php .....it has all of the outputs from the array you were trying to edit..... The easy way is to remove the output and don't mess with the array...:-)

 

  <tr>

   <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new_array[$i]['image'], $products_new_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?></td>

   <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id']) . '"><b><u>' . $products_new_array[$i]['name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . $products_new_array[$i]['date_added'] . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new_array[$i]['manufacturer'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price; ?></td>

   <td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new_array[$i]['id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>

 </tr>

Link to comment
Share on other sites

Sorry Kim, I think I'm the bird brain. :cry: I was watching you two talk together last night and....well what can I say :wink: Thanks so very, very much for the info. I will work on it and hope I don't screw it up too bad.

Sarah

A newbie who has learned just enough to be dangerous!

Link to comment
Share on other sites

Kim, I did it!! First try!! Thanks to you of course. You are GRRREAT!! :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

Sarah

A newbie who has learned just enough to be dangerous!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...