• 0
Sign in to follow this  
Guest --Frederico --

Erro

Question

Guest --Frederico --

Estou com o seguinte erro, mas não sei o que há de mais ou de menos.

Parse error: syntax error, unexpected ')' in new_products.php on line 39

Esse é o código:

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=' . $new_products['products_id]) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href=' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id]) . '">' . $new_products['products_name'] . '</a><br>' . (($new_products['products_price'] > 0) ? $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) : '')) .

'<a href=' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $new_products['products_name'] . TEXT_NOW) .

'<a href=' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id]) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_VIEW) . '</a>');

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Rapaz mais que emboleira que ta isso hein, edita e põe dentro das tags

 que fica maos fácil pra alguém te ajudar, do jeito que tá da nem pra saber qual é a linha 39 :blink:

Share this post


Link to post
Share on other sites
  • 0

Parse error: syntax error, unexpected ')' in new_products.php on line 39

36  'params' => 'class="smallText" width="33%" valign="top"',
37  'text' => '<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) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . (($new_products['products_price'] > 0) ? $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) : ''));
38  '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $new_products['products_name'] . TEXT_NOW) .
39  '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_VIEW) . '</a>');

Share this post


Link to post
Share on other sites
  • 0

O erro está aqui:

'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_VIEW) . '</a>');
Observe que você colocou a string dentro de parênteses ")" só que você só fechou e não abriu o mesmo. Troque por:
'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif', IMAGE_BUTTON_VIEW) . '</a>';

Deve funcionar.

T+

André

Edited by ARD

Share this post


Link to post
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
Answer this question...

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

Sign in to follow this