Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MelC

Archived
  • Posts

    24
  • Joined

  • Last visited

Profile Information

MelC's Achievements

  1. I haven't sold any vouchers. but i have issued 9 10% discount coupons with the code 0ef373
  2. Then why do coupons show up in the gv sent report then? this is a screen shot from a live, unmodified, gv_sent.php data from the db tables confirms that all items listed are welcome discount coupons. thoughts? :) thnx Mel
  3. to get GV_sent.php semi working i did the following Line 64 From $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id"; To $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, et.coupon_id, et.unique_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id"; Reson: Query was selecting c.coupon_id twice and not et.coupon_id. added to select et.unique_id Lines 68-81 replace all 7 instances coupon_id with unique_id note that coupon_code should stay as it is no idea what changing anyother instance of coupon_id would do. modified code block for 68-81 : if (((!$HTTP_GET_VARS['gid']) || (@$HTTP_GET_VARS['gid'] == $gv_list['unique_id'])) && (!$gInfo)) { $gInfo = new objectInfo($gv_list); } if ( (is_object($gInfo)) && ($gv_list['unique_id'] == $gInfo->unique_id) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->unique_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['unique_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname']; ?></td> <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td> <td class="dataTableContent" align="center"><?php echo $gv_list['coupon_code']; ?></td> <td class="dataTableContent" align="right"><?php echo tep_date_short($gv_list['date_sent']); ?></td> <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list['unique_id'] == $gInfo->unique_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_GV_SENT, 'page=' . $HTTP_GET_VARS['page'] . '&gid=' . $gv_list['unique_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> This will let you selet each voucher/coupon listed on the gv_sent page and see where it was sent to and when. Because the customer ID is not recorded in the email_track table for welcome discount coupons I cant (at present) tie this in to the redeem_track table used around line 100 (to display onscreen if a welcome discount coupon has been redeemed. This is covered in the Coupon Admin report, which does show redeemed vouchers, but not how many have been sent. hth. Mel
  4. indian_druid thnx for pointing me in the right direction. issue 1 - good spot on the gid not changing, question now is why? :) (keep reading..) changing the gid manually appears to work but all the data fields on the right are empty. issue 2 - its definaltey listing coupons in the gift voucher sent report. whether its supposed to or not - ya got me there. eg of the report listing Senders Name Voucher Value Voucher Code Date Sent Admin ?10.00 abcdef 04/13/2004 The code abcdef is actually the coupon code sent in admin/config/Welcome Discount Coupon Code. The value of abcdef in admin/Vouchers Coupons/Coupon admin is 10.0000% for both issues.... looking at the raw data & the code gv_sent.php is building from table coupon_email_track and table coupons and not differentiating between a coupon and a gift voucher. so both would/should appear in the report. Maybe this could be retitled to Coupons/GVs Sent? also the gId isn't changing because the link is being built using the coupon_id field not the unique id in the coupon_email_track table which is (funnily enough) called unique_id. the behaviour im seeing is due to all the coupons which have been sent having been welcome coupons which all have the same coupon_id. Showing values in ? and not % is done when this line of code executes <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td> so it formats the 10.0000% to ?10.00 may not be able to get around this one...(yet...) off to play :)
  5. Problems in Admin - gv_sent.php Under Gift Vouchers Sent I get a list of the vouchers which have been sent. Each is clickable. issue 1 : Whichever one i click i get the same exactly the same details show up in the right hand column for each item in the list. looks something like this [1] ?10.00 Senders ID: 0 Amount Sent: ?10.00.... etc... issue 2 : not major, just annoying :) I use a welcome discount coupon which is set for 10%. It is redeemed at 10%, but wherever it's displayed in the gv_sent.php it appears at ?10.00. (eg the Voucher Value column). gv_sent.php version is $Id: gv_sent.php,v 1.2.2.1 2003/04/18 16:17:14 wilt Exp $ from 5.10b version of CCGV im on 2.2MS2. the mod was actually installed & tested a couple of months ago, have only just noticed this behaviour, probably because I hadn't looked at it before. :) have scanned through the last 40 or so pages and couldn't find any mention of this type of behaviour so wondering if you have any ideas. thnx Mel
  6. MelC

    Paypal Module

    So it's now working with MS2 but the IPN still doesn't work... Have setup my paypal ipn to return to checkout_process.php The customer still needs to hit the continue button for the order to be placed in the database. Btw, You can now enable an auto return with paypal, so if this was set to checkout_process it would automatically bounce back to the osc site one the payment had been completed. Only problem is their requirements for the following to appear on the sucess page Example : Your payment has been processed and you will receive a reciept via email shortly. You can log into your account at www.paypal.com to see the details I can just go in and add a text line which gives this info but it would appear for all payment methods, and i cant spot how to determine which payment process was used in checkout_sucess to write an if statment in the language file. keep up the good work though :) Mel
  7. MelC

    Paypal Module

    Having debugged this to work with 2.2 MS2 (by comparing it to the original paypal.phpfile : changes you need to make are : change $osC_Currencies to $currencies - all instances change value() to get_value() - in the amount and shipping fields change decimalplaces to get_decimal_places - in the amount and shipping fields change $osC_Session to $session - all instances add $currency to the global variables list. - just the once :) its the value and decimalplaces which cause the unknown function errors. Here is the code from my working file, if you use this, be aware I have changed the $my_currency='USD'; line to $my_currency='GBP'; function process_button() { global $session, $order, $currency, $currencies; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'GBP'; } $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('first_name', $order->billing['firstname']) . tep_draw_hidden_field('last_name', $order->billing['lastname']) . tep_draw_hidden_field('address1', $order->billing['street_address']) . tep_draw_hidden_field('address2', $order->billing['suburb']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('state', $order->billing['state']) . tep_draw_hidden_field('zip', $order->billing['postcode']) . tep_draw_hidden_field('lc', $order->billing['country']['iso_code_2']) . tep_draw_hidden_field('email', $order->customer['email_address']) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('no_note', '1') . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); return $process_button_string; }
  8. Thnx michimaus, worked great :)
  9. Have installed it & it appears in admin ok. when i try to do 'Create Complete tab-delimited .txt file in temp dir' I get 1054 - Unknown column 'p.products_master' in 'field list' followed by a long select statment finishing with [TEP STOP] the three which start 'Create Model/...etc' all work fine, but the froogle option does the same as above. Same for download options - Download Complete and Download Froogle options give the same error, but the other two download options work fine. version of easy populate from easypopulate4masterproducts.zip Instructions followed from EP_v2_73_MS2.zip after installing the easypopulate.php from the easypopulate4masterproducts.zip file it asked for the functions php file which I then grabbed from the 2.73 version zip. OSC version 2.2MS2 me or the code? (probably me :) ) thnx Mel
  10. heya, First contrib i've installed, and it does all work. Am pretty sure I've done something wrong somwhere though - In admin, when I click on configuration, the menu on the left show's two entries for 'Vouchers/Coupons' when you click on one, the other automatically opens. Both the GV & the Discount Coupons work fine, just not sure what i've done to get the effect :) also the installation info mentions a 'Welcome' voucher for when people sign up - I cant find this? any ideas are welcome. Thnx Mel
×
×
  • Create New...