Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Special Price when add to cart


mileage

Recommended Posts

Posted
Hello All,

 

I hope this is the right board to ask.

 

I'm looking for a contribution that show the special price when the item(s) add into the cart.

Like Circuit city

e.g

circuit city price add

Hi

 

I did this a few weeks ago and it worked. I found this thread useful but I spent a day trying to work it out. I am not a programmer, I just know enough to get by and I tried so many things, I've forgot what I did.

 

In catalog/shopping_cart, find this, around line 147

 

	  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>');
}

 

and replace with this. This is the actual code I am using and it includes an extra <tr> for a dotted line

 

if ($currencies->display_price($listing['products_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) == $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity'])) {

  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' =>  $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '<tr><td colspan="7"><hr class="ProdListDiv" noshade="noshade" size="1" align="left"></td></tr>');
}
else {

  $info_box_contents[$cur_row][] = array('align' => 'right',
										 'params' => 'class="productListing-data" valign="top"',
										 'text' => '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' .  ' ' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '<tr><td colspan="7"><hr class="ProdListDiv" noshade="noshade" size="1" align="left"></td></tr>');
}

 

Like I said, I don't know what else I did :blush: :'( . Hopefully someone else may be able to help

 

Cheers

 

Ian

Archived

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

×
×
  • Create New...