Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

shopping cart: translate 'or remove' when changing the language


ozcamping

Recommended Posts

osC 2.3.1Under 'Cart Contents', next to the update button, I would like to have 'or remove' also to be translated automatically in the corresponding language after having changed to it (several language packs installed).The affected files are:/shopping_cart.phpand/includes/languages/english/shopping_cart.php (here the necessary definition already exists: 'TABLE_HEADING_REMOVE')Sorry, but I'm having trouble changing (in /shopping_cart.php) the following to a working status...---------- $products_name .= '

 

' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . ' or remove';----------I tried to replace the 'remove' with '' like:';Any idea, why this doesn't work? Thank you!

Link to comment
Share on other sites

I had the same problem translating that bit, since it is defined in catalog\shopping_car.php, which is not a language file

 

The way around it that I found was to install a button for the remove action, as described here:

 

http://www.oscommerce.com/forums/topic/368025-missing-remove-button-in-the-cart-contents/

 

So, now, the only part that is not translate is the "or" - but the translated button is there!

Link to comment
Share on other sites

Thank you for your reply. Yes, I had that idea also - but in the meantime found a 1:1 solution thumbsup.gif )

 

1)

shopping_cart.php

 

add (top, before ?>):

 

$or = TABLE_HEADING_OR;

$remove = TABLE_HEADING_REMOVE;

 

 

change to (following is already modified):

 

$products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'],

 

'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE,

 

'refresh') . ' '. $or .' <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' .

 

$products[$i]['id'] . '&action=remove_product') . '">'. $remove .'</a>';

 

2)

/includes/languages/english/shopping_cart.php

 

add:

 

define('TABLE_HEADING_OR', '- oder -');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...