Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Little code help


keoga

Recommended Posts

Hi everybody,

 

Could someone help me with a little code?

 

I have my products weight showing in the products_info.php after the quantity field with this code:

 

<input type="text" name="quantity" value="1" maxlength="2" size="2">    <?php echo TITLE_WEIGHT; ?>

<?php echo $product_info['products_weight'] . 'Kg'; ?><br><br>

 

What I would like is not to show the weight for my country "sweden" only for the rest of the world.

 

I know it should be some kind of statement like

 

if

customers_default_address_id="se" dont show, but I don't know how to code this, and do I need a database query to check the customers_default_address_id?

 

 

Does someone has a little knowledge to share, thank you!

Link to comment
Share on other sites

Hi everybody,

 

Could someone help me with a little code?

 

I have my products weight showing in the products_info.php after the quantity field with this code:

 

<input type="text" name="quantity" value="1" maxlength="2" size="2">     <?php echo  TITLE_WEIGHT; ?>

        <?php echo $product_info['products_weight'] . 'Kg'; ?><br><br>

 

What  I would like is not to show the weight for my country "sweden" only for the rest of the world.

 

I know it should be some kind of statement like

 

if 

customers_default_address_id="se"  dont show, but I don't know how to code this, and do I need a database query to check the customers_default_address_id?

Does someone has a little knowledge to share, thank you!

 

if the browser has no account or is not signed in, you have no way of knowing that information so what's the point.

Treasurer MFC

Link to comment
Share on other sites

if the browser has no account or is not signed in, you have no way of knowing that information so what's the point.

 

Well there is a point, yes the user needs to have an account. If like me I have a flat rate shipping for my zone sweden, and a table rate shipping based on weight for the rest of the zones, It does look better without the weight not showing up on my own countrys pages.

 

I know that the user must be logged in.

 

I'm trying out something like this: but damned must buy a php book :-)

 

 

 

<?php

$customers_info_query = tep_db_query("select customers_default_address_id from " . TABLE_CUSTOMERS . );<<wrong :)

$product_info = tep_db_fetch_array($product_info_query);?>

 

There must be a WHERE logged in customer...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...