

Wired PSF
Members-
Content count
190 -
Joined
-
Last visited
Profile Information
-
Real Name
PSF
-
Ok, that was simple enough :D One question. How do I remove the line gaps between the following with the shopping_cart_box: Sub-Total: ?310.90 Discount: - ?29.60 Total: ?281.31 Thanks W
-
:-" forgot about the functions file. Looks good now. Thanks again for your help on that. I am going to try and get it working in the cart box now!! W
-
Perfect. Many thanks for your help with that Amanda. Only thing I have outstanding now is to attached a class to 10% discount on VAT products: ?value I have tried a number of ways to do this but it will not change. I have done it successfully for the Total value line at the bottom tho. Sub-Total: ?73.85 CORRECT Class 10% discount on VAT products: - ?7.39 WRONG CLASS (Dont thing a class is attached!!) Total: ?66.47 CORRECT Class
-
Thanks This now calculates the 10% correctly. Many thanks. However, if I add two of the same to my basket, it only gives me the discount of 1 item ie 2 products at ?150.50 each Sub-Total: ?310.00 10% discount on VAT products: - ?15.50 Total: ?294.50 If I add unique items then it does calculate it correctly. How can we correct this so that the discount goes across multiple same items? Thanks W
-
Hi I am also still trying to get the fonts the same. I have changed: $this->output[] = array('title' => $easy_discounts[$i]['description'].': ', 'text' => '<font color="red" class="main">-' . $currencies->format($easy_discounts[$i]['amount']).'</font>', 'value' => $easy_discounts[$i]['amount']); to $this->output[] = array('title' => $easy_discounts[$i]['description'].': ', 'text' => $currencies->format($easy_discounts[$i]['amount']), 'value' => $easy_discounts[$i]['amount']); but i still get a red discount and in Times NR. I just want the regular class="main" applied to it all which is blue verdana. Cheers W
-
Hi Thanks, tried that too and almost working. The first item below should have the discount. It does get one but it is not calculated correctly. INCLUDES VAT: Sub-Total: ?5.95 10% discount on VAT products: - ?0.51 Total: ?5.44 This second item should NOT have a discount as it does not have tax applied to it. This is correct. VAT FREE ITEM: Sub-Total: ?14.95 Total: ?14.95 Note, I removed the non part as it the message line implied the opposite to what I want to achieve. So, just need to resolve the 10% part and we are there? Cheers W
-
Hi Sorry, I still cannot get the 10% discount on all products excluding those that are tax free. I tried the above in post 395 again but alas see no change. What am I doing wrong? Thanks W
-
Hmm, nothing happened when I did that, I got no discount at all? To confirm, I replaced if ($cart->count_contents() > 0) { $new_discount = $cart->show_total() * 0.1; // 10% of cart total $easy_discount->set('TST','10% Online Discount', $new_discount); } else { $easy_discount->clear('TST'); } // get the cart totals once if ($cart->count_contents() > 0) { $cart_weight = $cart->show_weight(); $cart_total = $cart->show_total(); } else { $cart_total = 0; $cart_weight = 0; } with yours. That was correct right? Thanks W
-
Ok, fixed this now. 10% discount works on all products Sub-Total: ?109.95 Online Discount: - ?11.00 Total: ?98.96 So, just need to make it ignore vat free products. Also I have a table alignment problem. On the above, the whole Sub total line including the price is in say column A, plus 'Online Discount:' and 'Total:' but not the -11 and 98.96. My shopping cart code looks like: </tr> <tr> <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td> </tr> <?php if ($easy_discount->count() > 0) { echo easy_discount_display(); echo '<tr><td align="right">'.SUB_TITLE_TOTAL.'</td><td align="right">'.$currencies->format(($cart->show_total() - $easy_discount->total())).'</td></tr>'; } ?> Any ideas on this? Thanks for patience. W
-
Hmm, something odd is going on here. I changed if ($cart->count_contents() > 0) { $easy_discount->set('TST','Discount test',50); } else { $easy_discount->clear('TST'); } to if ($cart->count_contents() > 0) { $new_discount = $cart->show_total() * 0.1; // 10% of cart total $easy_discount->set('COUPON1','10% Coupon Discount', $new_discount); } else { $easy_discount->clear('TST'); } to apply a 10% discount. In my cart i know get Discount test: - ?50.00 10% Coupon Discount: - ?112.90 To make sure I had not left part of the original in i copied in backed up shopping_cart and application_top files and re-ented code as per install but the above still shows! Tried removing cache too but no difference. W
-
Splendid. That works successfully. I have tried the other discount code you suggested on page 19 re 10% discount on taxable goods and no discount on tax free items, ie // discount issue per product with tax for x = 1 to products in cart { if (taxed product) add discount for product } // discount combined discount = 0 for x = 1 to products in cart { if (taxed product) add to discount total } if (discount > 0 ) add discount for all but i get Parse error: parse error, unexpected T_STRING, expecting '(' in /catalog/includes/application_top.php on line 552 Hmm, I see in the above there is no mention of the 10%? W
-
Hi Boxtel I have done about 20 other contribs which work successfully. For some reason I cannot get my head around this. I'll go through the install notes again and try to figure out what needs to go where. Sure I am just missing something obvious? Cheers W
-
Hi I added the following in application_top AFTER: if (!tep_session_is_registered('easy_discount')) { tep_session_register('easy_discount'); $easy_discount = new easy_discount(); } ADDED: // discount issue per product with tax for x = 1 to products in cart { if (taxed product) add discount for product } // discount combined discount = 0 for x = 1 to products in cart { if (taxed product) add to discount total } if (discount > 0 ) add discount for all // include the mail classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); I get this error though: Parse error: parse error, unexpected T_STRING, expecting '(' in /catalog/includes/application_top.php on line 272 :( W
-
as per the image in the contrib, i was expecting to see the discount line added to my basket.
-
Within shopping_cart.php, in the instal where it says 1) in top of shopping_cart.php add: include_once (DIR_WS_FUNCTIONS.'easy_discount.php'); I have mine as follows Released under the GNU General Public License */ require("includes/application_top.php"); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); include_once (DIR_WS_FUNCTIONS.'easy_discount.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> and then further down i have <tr> <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?></b></td> </tr> <?php if ($easy_discount->count() > 0) { echo easy_discount_display(); echo '<tr><td align="right">'.SUB_TITLE_TOTAL.'</td><td align="right">'.$currencies->format(($cart->show_total() - $easy_discount->total())).'</td></tr>'; } ?> <?php if ($any_out_of_stock == 1) { if (STOCK_ALLOW_CHECKOUT == 'true') { ? but i cannot see any change to my basket (even when logged in). W