Courty Posted November 30, 2007 Share Posted November 30, 2007 (edited) Try putting in a product that is expensive (>£/$100) and heavy (>3kg) and try again - I just fought with mine for an a couple of hours before I worked out that the latest contrib now comes with the percent mod pre installed, so if you have a £/$1 product that weighs 0, the giftwrap show 0 as well ! (i wish people would't dick with things !) :angry: to fix the problem open catalog/includes/modules/giftwrap/giftwrap.php Find this 'methods' => array(array('id' => $this->code, 'title' => MODULE_GIFT_TEXT_WAY, 'cost' => MODULE_GIFT_COST * $total_weight))); and change it back to this ! 'methods' => array(array('id' => $this->code, 'title' => MODULE_GIFT_TEXT_WAY, 'cost' => MODULE_GIFT_COST))); Have Fun Courty Edited November 30, 2007 by Courty Quote Link to comment Share on other sites More sharing options...
marcinmf Posted November 30, 2007 Share Posted November 30, 2007 I am having small problem on this page: admin/modules.php?set=giftwrap&osCAdminID=xxxxxxxx Error! Unable to determine connection method on a link! Known methods: NONSSL SSL Function used: tep_href_link('modules.php', 'set=giftwrap&module=nogiftwrap', '') I am running cre loaded, Any ideas where i should start to look for the solution? Quote Link to comment Share on other sites More sharing options...
cleverflo Posted January 12, 2008 Share Posted January 12, 2008 Hi, Would someone know a code to show a set price per total weight for example: if total order weight <200g = gift wrap = £1 if total order weight > 200g = gift wrap = £3 etc... I'm selling jewellery items and I'm having an issue where if a customer buys 1 ring the gift wrap shows £1 but if he buys 4 rings the gift wrap shows £4, whereas I can wrap them all together in the same pouch so it looks like I'm riping off my customers! Any idea? Thanks Flo Quote Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2008 Share Posted November 30, 2008 Thanks in advanced for your help! I have installed this contribution. It is not appearing or adding to the total in checkout_confirmation. If I select gift wrapping on checkout_shipping and then return to the page it is not selected so it appears not to be selecting on the checkout_shipping page. Sort order is correct so I'm pretty sure that is not the issue. Thanks Quote Link to comment Share on other sites More sharing options...
superfrank Posted February 12, 2009 Share Posted February 12, 2009 great contribution. Works quite good, but I do not get the box for the text entry of the gift order. There is only the box for the standard input. Me too, I would love to have that additional text input box! It seems like the code is written to provide that, but it doesnt show up. Am I right, and is this contrib supposed to do that, so perhaps I broke my code somewhere along the way? Or is this a bug and it doesn't work for anyone? Quote Link to comment Share on other sites More sharing options...
superfrank Posted February 13, 2009 Share Posted February 13, 2009 Hello Dave, I modifed my code with yours and it does 'hightlight' the No Giftwrap with a colored bar but does not select the radio button. The user still has to click it to activate the radio button. Do you, or anyone else that knows more than I know a way to not only hightlight but activate the radio button too? Thanks in advance. I have found a solution that is not the most elegant way, but works for me (2.2MS2). In checkout_shipping.php, find the code: <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen $checked = (($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) ? true : false); if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) { echo ' <tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> and replace with: <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen $checked = (($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) ? true : false); if (!$checked) { if ($i == 0) { $checked = true; } else { $checked = false; } } if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) || ( $i == 0 && $giftwrap_info['id'] == "" )) { echo ' <tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> IMPORTANT: Sort order (still) doesn't work if in the admin section value "0" is used. You MUST use order values "1" and "2" for this to work. The lowest number will be checked by default. Quote Link to comment Share on other sites More sharing options...
agentjensen Posted June 19, 2009 Share Posted June 19, 2009 I have same problem as written below - any solution????? Using Osc RC2A. best Regards Michael. After hitting continue on checkout_shipping.php I get this error: Fatal error: Cannot use object of type __PHP_Incomplete_Class as array in /home/crust/public_html/includes/classes/gift.php on line 25 Can anyone help? Jacob Quote Link to comment Share on other sites More sharing options...
gaaalmp Posted September 10, 2009 Share Posted September 10, 2009 Hi all, I know this is a really old dead thread and its a long shot asking... but I was wondering if someone could help me locate where in the code the tax for the giftwrap is calculated against the billing address not the shipping address. From my tests this seems the case. I have made some minor changes for this contribution and some based on this threads posts, if I can get the tax to work correctly for my scenario I will update the contribution addons with all the changes and information. Here is a summary of the problem I have encountered: I created two test accounts : 1) Billing address :USA Shipping address : USA and Australia 2) Billing address :Australia Shipping address : USA and Australia In osCAdmin > modules > giftwrap I have activated both GiftWrap and NoGiftWrap Modules and setup the GiftWrap Options. I entered the giftwrap cost in the Admin panel WITHOUT tax i.e. 4.545. I installed the osCAdmin > modules > OrderTotal > giftwrap module and gave it the tax class of 10% which only is applied to Australia. I have, on admin > modules > order total, the following sort order: 1: subtotal 2: delivery 3: giftwrap 4: tax 5: total I get the following tests when I make a purchase of a $44 product which includes the 10% tax: NOTE: tax is not collected for shipping it is passed on. Scenario 1 Billing address: AUS shipping address: AUS Sub-Total: $44.00 Flat rate delivery (For our Australian customers): $7.50 Gift Wrap: $5.00 GST: $4.45 Total: $56.50 This is correct as it is charging 10% for the product and Giftwrap. 44 + 5 = 49 / 11 = 4.45 Scenario 2 Billing address: AUS shipping address: USA Sub-Total: $40.00 Flat rate delivery (For our International customers): $30.00 Gift Wrap: $5.00 GST rate: $0.45 Total: $75.00 This is incorrect as it is charging 10% for the Giftwrap. All orders shipped international should be excluded from tax. If I run the same tests in the opposite order I get the following results: Scenario 3 Billing address: USA shipping address: USA Sub-Total: $40.00 Flat rate delivery (For our International customers): $30.00 Gift Wrap: $4.55 Total: $74.55 This is correct as it is charging no tax for the product or Giftwrap. Scenario 4 Billing address: USA shipping address: AUS Sub-Total: $44.00 Flat rate delivery (For our Australian customers): $7.50 Gift Wrap: $4.55 GST: $4.00 Total: $56.05 This is incorrect as it does not charge the 10% for the Giftwrap but does for the product. From my understanding this tells me that the Giftwrap tax is calculating it based on the billing address where the product does not. Would appreciate any feedback to point me in the right direction. Regards George Quote Link to comment Share on other sites More sharing options...
zaannyy Posted September 28, 2009 Share Posted September 28, 2009 I have found a solution that is not the most elegant way, but works for me (2.2MS2). In checkout_shipping.php, find the code: <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen $checked = (($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) ? true : false); if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) { echo ' <tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> and replace with: <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen $checked = (($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) ? true : false); if (!$checked) { if ($i == 0) { $checked = true; } else { $checked = false; } } if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) || ( $i == 0 && $giftwrap_info['id'] == "" )) { echo ' <tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> IMPORTANT: Sort order (still) doesn't work if in the admin section value "0" is used. You MUST use order values "1" and "2" for this to work. The lowest number will be checked by default. I know this reply comes a lot after your comment and code posted here but thanks this solved my problem after trying myself for a few days! :rolleyes: :rolleyes: Quote Link to comment Share on other sites More sharing options...
scd Posted December 15, 2009 Share Posted December 15, 2009 Not sure if anyone is still using this thread, but it's worth a shot. I've got the gift wrap 2.0 working beautifully, the only issue, is that i am not receiving any info in email or admin as to the customers choice of gift wrap or no gift wrap. If searched through every file i could think of, but can't seem to find where the code is located. Any help would be awesome. Cheers. Quote Link to comment Share on other sites More sharing options...
leelee2023 Posted January 3, 2010 Share Posted January 3, 2010 Also i am going to try and add a new feature during the checkout that works WITH the per item fee, that will allow the module to show a list of current cart items with a checkbox next to each one so that you can not only choose the per item fee but select which ones to charge for it, in case the customer only wants three of the five current items gift wrapped, this along with the new logic for different charging styles should make this a very commercially viable Gift Wrap Solution :) I am in no way suggesting that the hard work done by the creators and submitters to this fine mod is not professional in and of itself, only making a comment about the current, minor limitation of the addon :) Please prv me if anyone knows of a solid means of acheiving this and i will be open to all suggestions !!! sincerely and respectfully ggbig... Hey there ggbig, just wondering if this was ever achieved? I've just installed the mod but I couldn't see this feature, which is something I'd absolutely love to see on there! Quote Link to comment Share on other sites More sharing options...
leelee2023 Posted January 3, 2010 Share Posted January 3, 2010 Hey there ggbig, just wondering if this was ever achieved? I've just installed the mod but I couldn't see this feature, which is something I'd absolutely love to see on there! Oops forget that.. I've just found the mod bit :) Nice one!! Quote Link to comment Share on other sites More sharing options...
drillsar Posted December 31, 2010 Share Posted December 31, 2010 (edited) I was wondering if anyone figured out how to use this only for certain products, thanks Edited December 31, 2010 by drillsar Quote Link to comment Share on other sites More sharing options...
web2dev Posted May 3, 2011 Share Posted May 3, 2011 Not sure if anyone is still using this thread, but it's worth a shot. I've got the gift wrap 2.0 working beautifully, the only issue, is that i am not receiving any info in email or admin as to the customers choice of gift wrap or no gift wrap. If searched through every file i could think of, but can't seem to find where the code is located. Any help would be awesome. Cheers. I'm having the same problem. Can anyone please help me? The information on weather gift wrap is selected or not doesn't appear anywhere in the e-mail, or order details (orders.php) or invoice or packing slip. However the addon readme file says it should appear in "Customers Order Invoice and Packing Slip". I'm using OSC v. 2.2 RC2 and Giftwrap v2.0. thanks George Quote Link to comment Share on other sites More sharing options...
lildog Posted July 31, 2011 Share Posted July 31, 2011 I'm having the same problem. Can anyone please help me? The information on weather gift wrap is selected or not doesn't appear anywhere in the e-mail, or order details (orders.php) or invoice or packing slip. However the addon readme file says it should appear in "Customers Order Invoice and Packing Slip". I'm using OSC v. 2.2 RC2 and Giftwrap v2.0. thanks George Many apologies for my tardiness. This is a simple fix...in the admin send extra order emails to your email address. It is not really the best way to do this, but I usually turn this on for my shop owners anyhow and have overlooked mentioning it. I am now working on it again and mentioning this in the readme.txt. I have also fixed a few issues with the logic that controls the show/hide of the giftcard question. Real soon I am going to be releasing a version for OSC2.3. Todd Quote Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2011 Share Posted December 11, 2011 (edited) Many apologies for my tardiness. This is a simple fix...in the admin send extra order emails to your email address. It is not really the best way to do this, but I usually turn this on for my shop owners anyhow and have overlooked mentioning it. I am now working on it again and mentioning this in the readme.txt. I have also fixed a few issues with the logic that controls the show/hide of the giftcard question. Real soon I am going to be releasing a version for OSC2.3. Todd Any way someone might clean up the instructions for 3.o.4 Have to go back to 3.0.0 to find the instructions and things have changed. Instructions for 3.0.4 are incomplete and parts missing Thanks Edited December 11, 2011 by badbo Quote Link to comment Share on other sites More sharing options...
abdelatif Posted June 21, 2012 Share Posted June 21, 2012 (edited) I have installed this great contribution, but what a pity it is, to see that so much code is missing in the latest version of giftwrap 3.03 en 3.04 Out of the box 3.04 is not working, to much code missing? I finaly managed to merge the installation instructions from the 3.00 version and the 3.04 version because I really wanted this contrib. And got it working. The files effected are mainly catalog/checkout_shipping and catalog/checkout_confirmation. I will put both of the edited files here, for interested ones. I am not sure I missed something, but at least it is working for me as it is. I also want more than one product at display, like wrappingpaper or gift box etc, so I changed the code of JangoF post #115 on page 6 ============================ (here his information) Copy-paste includes\modules\giftwrap\giftwrap.php and name it gift2.php Make changes: class giftwrap -> class gift2 function giftwrap -> function gift2 $this->code = 'giftwrap'; -> $this->code = 'gift2'; Search and replace (Match Case) GIFT_ with GIFT2_ (17 occurences) and Copy-paste includes\languages\english\modules\giftwrap\giftwrap.php and name it gift2.php Make changes: Search and replace (Match Case) GIFT_ with GIFT2_ (3 occurences) ============================== THe thing now is, that the messagefield of the second module doesn't hide, it is always visible. Also only one instance of the module got counted in the total of the order so only wrapping paper or only gift box, also if both are selected. What am I missing anyone?? Here the files I changed version 3.00 and 3.04 in catalog/checkout_shipping in order of the instruction files I changed You need the original instructions with it to know where the code has to be inserted. // load all enabled shipping modules require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; ***ADD BEFORE:----> Add this just BEFORE it <---- //BOF osc_Giftwrap // load giftwrap module require(DIR_WS_CLASSES . 'gift.php'); $giftwrap_modules = new gift;[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]// process the selected giftwrap method if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) { if (!tep_session_is_registered('giftwrap_info')) tep_session_register('giftwrap_info'); //if (!tep_session_is_registered('giftwrap')) tep_session_register('giftwrap'); //tep_session_unregister('giftwrap'); if (!tep_session_is_registered('giftwrap_message')) tep_session_register('giftwrap_message'); if (!tep_session_is_registered('giftwrap_card')) tep_session_register('giftwrap_card');[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] if (tep_count_giftwrap_modules() > 0) { //at least 1 giftwrap module is loaded //see if a giftwrap method was selected if ( (isset($HTTP_POST_VARS['giftwrap'])) && (strpos($HTTP_POST_VARS['giftwrap'], '_')) ) { $giftwrap_infoA = $HTTP_POST_VARS['giftwrap']; list($module, $method) = explode('_', $giftwrap_infoA); if (is_object($$module)) { $quote1 = $giftwrap_modules->quote1($method, $module); if (isset($quote1['error'])) { tep_session_unregister('$giftwrap_info'); } else { if ( (isset($quote1[0]['methods'][0]['title'])) && (isset($quote1[0]['methods'][0]['cost'])) ) { /*$giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . ' (' . $quote1[0]['methods'][0]['title'] . ')', 'cost' => $quote1[0]['methods'][0]['cost']);*/ $giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . $quote1[0]['methods'][0]['title'], 'cost' => $quote1[0]['methods'][0]['cost']); } }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] } else { tep_session_unregister('giftwrap_info'); } }else{ tep_session_unregister('giftwrap_info'); }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] //determine whether of not giftcard was selected if(isset($HTTP_POST_VARS['giftwrap_card']) && $HTTP_POST_VARS['giftwrap_card']){ //giftcard Checked $giftwrap_card = $HTTP_POST_VARS['giftwrap_card']; }else { //giftcard unchecked tep_session_unregister('giftwrap_card'); }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] // add gift message if (tep_not_null($HTTP_POST_VARS['giftMessage']) && tep_session_is_registered('giftwrap_info') && isset($HTTP_POST_VARS['giftwrap_card'])) { if (!tep_session_is_registered('giftwrap_message')) tep_session_register('giftwrap_message'); $giftwrap_message = tep_db_prepare_input($HTTP_POST_VARS['giftMessage']); }else{ tep_session_unregister('giftwrap_message'); } } else { // no Giftwrap modules enabled/installed $giftwrap_info = false; } }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]// get all available giftwrap quotes $quotes1 = $giftwrap_modules->quote1(); //EOF osc_Giftwrap ======================================================================================= <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> ======================================================================================= //BOF osc_Giftwrap function selectRowEffectGift(object, buttonSelect) { if (!selectedgift) { if (document.getElementById) { selectedgift = document.getElementById('defaultSelectedGift'); } else { selectedgift = document.all['defaultSelectedGift']; } } if (selectedgift) selectedgift.className = 'moduleRow'; object.className = 'moduleRowSelected'; selectedgift = object; // one button is not an array if (document.checkout_address.giftwrap[0]) { document.checkout_address.giftwrap[buttonSelect].checked=true; } else { document.checkout_address.giftwrap.checked=true; } } function rowOverEffectGift(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } function rowOutEffectGift(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } $(document).ready(function(){ $('#giftwrapcard_heading').css('display','none'); $('#giftwrapcard_box').css('display','none'); $('#giftwrap_message_title').css('display','none'); $('#giftwrap_message_field').css('display','none'); if($('input[name=giftwrap]').is(':checked')){ //show card message $("#giftwrapcard_heading").show("fast"); $("#giftwrapcard_box").show("fast"); } if($('input[name=giftwrap_card]').is(':checked')){ $("#giftwrap_message_title").show("fast"); $("#giftwrap_message_field").show("fast"); } // Add onclick handler to checkbox w/id checkme $("input[name=giftwrap]").click(function(){ // If checked if ($("input[name=giftwrap]").is(":checked")){ //show the hidden div $("#giftwrapcard_heading").show("fast"); $("#giftwrapcard_box").show("fast"); }else{ //otherwise, hide it $("#giftwrapcard_heading").hide("fast"); $("#giftwrapcard_box").hide("fast"); $("#giftwrap_message_title").hide("fast"); $("#giftwrap_message_field").hide("fast"); //uncheck giftwrapcard_box if($('input[name=giftwrap_card]').is(':checked')){ $('input[name=giftwrap_card]').attr('checked', false); } } }); $("#giftwrap_card_checkbox").click(function(){ // If checked if ($("#giftwrap_card_checkbox").is(":checked")){ //show the hidden div $("#giftwrap_message_title").show("fast"); $("#giftwrap_message_field").show("fast"); }else{ //otherwise, hide it $("#giftwrap_message_title").hide("fast"); $("#giftwrap_message_field").hide("fast"); } }); }); //EOF osc_Giftwrap ======================================================================================= [/font][/color] <!--BOF osc_Giftwrap --> <?php if (tep_count_giftwrap_modules() > 0) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_GIFTWRAP_METHOD; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $quotes1_size = sizeof($quotes1); //number of GW modules loaded /* if ($quotes1_size > 1) { */ if ($quotes1_size > 0) { //at least one gw module is loaded ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td span class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_GIFTWRAP_METHOD; ?></td> <td class="main" width="50%" valign="top" align="right"><?php //echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.png'); ?></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> <?php $radio_buttons = 0; for ($i=0; $i<$quotes1_size; $i++) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (isset($quotes1[$i]['error'])) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" colspan="3"><?php echo $quotes1[$i]['error']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } else { $size = sizeof($quotes1[$i]['methods']); for ($j=0, $n2=$size; $j<$n2; $j++) { // set the radio button to be checked if it is the method chosen if($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']){ $checked = (true); }else{ $checked = (false); } if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) { echo '<tr id="defaultSelectedGift" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } else { echo '<tr class="moduleRow" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffectGift(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="75%"><?php echo $quotes1[$i]['methods'][$j]['title']; ?></td> <?php if ( ($quotes1_size > 0) || ($n2 > 0) ) { if (DISPLAY_PRICE_WITH_TAX == 'true') { $gift_tax_rate_tmp = tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS); $gift_tax_amt_tmp = $quotes1[$i]['methods'][$j]['cost']; $gift_tax_amt_tmp += tep_calculate_tax($quotes1[$i]['methods'][$j]['cost'], $gift_tax_rate_tmp); ?> <td class="main"><?php echo $currencies->format($gift_tax_amt_tmp); ?></td> <?php } else { // display price without tax ?> <td class="main"><?php echo $currencies->format($quotes1[$i]['methods'][$j]['cost']); ?></td> <?php } ?> <td class="main" align="right"><?php echo tep_draw_checkbox_field('giftwrap', $quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'], $checked); ?></td> <?php } ?> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!-- Add giftcard radio buttons --> <?php //should card button be checked? // there is a message and it is not null OR if the button is checked if (tep_session_is_registered('giftwrap_card') && tep_not_null('giftwrap_card')) { $giftCard_checked=TRUE; }else{ $giftCard_checked=FALSE; } ?> <tr id="giftwrapcard_heading"> <td span class="main" width="50%" valign="top" id="giftwrap_card_title"><?php echo TEXT_CHOOSE_GIFTWRAP_CARD; ?></td> </tr> <?php //echo '<tr id="giftwrapcard_box" class="moduleRowSelected" onmouseover="rowOverEffectGift(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, 0)">' . "\n"; ?> <tr id="giftwrapcard_box"> <td class="main"><?php echo TEXT_GIFTWRAP_CARD; ?></td> <td class="main" align="right"> <?php echo tep_draw_checkbox_field('giftwrap_card', TRUE, $giftCard_checked, 'id="giftwrap_card_checkbox"'); ?> </td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <!--add message field--> <tr> <td colspan="5" class="main" id="giftwrap_message_title"><b><?php echo 'Persoonlijk bericht op kaart'; ?></b></td> </tr> <tr> <td colspan="5" id="giftwrap_message_field"><?php echo tep_draw_textarea_field('giftMessage', 'soft', '60', '5', $giftwrap_message); ?></td> </tr> <?php $radio_buttons++; } } ?> </table></td> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> <?php } ?> <!--EOF osc_Giftwrap--> in catalog/checkout_confirmation in order of the instruction files I changed. /BOF osc_Giftwrap // load the selcted giftwrap module //require(DIR_WS_CLASSES . "gift.php"); //$giftwrap_modules = new gift($giftwrap); //EOF osc_Giftwrap =============================================================== <!-- BOF osc_Giftwrap --> <?php if ($order->info['giftwrap_method']) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr>[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] <tr> <td class="main"><b><?php echo HEADING_GIFTWRAP_METHOD; ?></b></td> </tr> <tr> <td class="main"><?php echo $order->info['giftwrap_method']; ?></td> </tr> <tr> <td class="main"><b><?php echo 'Bericht op kaart'; ?></b></td> </tr> <tr> <td class="main"><?php echo $giftwrap_message; ?></td> </tr> <?php } ?> <!-- EOF osc_Giftwrap --> Hope this wil help someone else having trouble with the version 3.04 Also if someone has a solution on the multiple gifts as above that would be greatly appreciated. Edited June 21, 2012 by abdelatif Quote Link to comment Share on other sites More sharing options...
abdelatif Posted June 21, 2012 Share Posted June 21, 2012 I see a lot of [color=#282828][font=helvetica, arial, sans-serif] In all the code above, this has something to do with this board, the <> code function has done that. Offcourse this has nothing to do with the code of the module. But I cannot edit my own post anymore :( Quote Link to comment Share on other sites More sharing options...
drofercon Posted January 13, 2013 Share Posted January 13, 2013 Hello, I need help installing this application. I have a question to modify CATALOG / CHECKOUT_SHIPPING.PHP, the information given is to look for something to change it again, but does not indicate what to look for. ***FIND:=======================> Locate the following code <================================ //BOF osc_Giftwrap // load giftwrap module require(DIR_WS_CLASSES . 'gift.php'); $giftwrap_modules = new gift; // process the selected giftwrap method if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) { if (!tep_session_is_registered('giftwrap_info')) tep_session_register('giftwrap_info'); //if (!tep_session_is_registered('giftwrap')) tep_session_register('giftwrap'); //tep_session_unregister('giftwrap'); if (!tep_session_is_registered('giftwrap_message')) tep_session_register('giftwrap_message'); if (!tep_session_is_registered('giftwrap_card')) tep_session_register('giftwrap_card'); if (tep_count_giftwrap_modules() > 0) { //at least 1 giftwrap module is loaded //see if a giftwrap method was selected if ( (isset($HTTP_POST_VARS['giftwrap'])) && (strpos($HTTP_POST_VARS['giftwrap'], '_')) ) { $giftwrap_infoA = $HTTP_POST_VARS['giftwrap']; list($module, $method) = explode('_', $giftwrap_infoA); if (is_object($$module)) { $quote1 = $giftwrap_modules->quote1($method, $module); if (isset($quote1['error'])) { tep_session_unregister('$giftwrap_info'); } else { if ( (isset($quote1[0]['methods'][0]['title'])) && (isset($quote1[0]['methods'][0]['cost'])) ) { /*$giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . ' (' . $quote1[0]['methods'][0]['title'] . ')', 'cost' => $quote1[0]['methods'][0]['cost']);*/ $giftwrap_info = array('id' => $giftwrap_infoA, 'title' => $quote1[0]['module'] . $quote1[0]['methods'][0]['title'], 'cost' => $quote1[0]['methods'][0]['cost']); } } } else { tep_session_unregister('giftwrap_info'); } }else{ tep_session_unregister('giftwrap_info'); } //determine whether of not giftcard was selected if(isset($HTTP_POST_VARS['giftwrap_card']) && $HTTP_POST_VARS['giftwrap_card']){ //giftcard Checked $giftwrap_card = $HTTP_POST_VARS['giftwrap_card']; }else { //giftcard unchecked tep_session_unregister('giftwrap_card'); } // add gift message if (tep_not_null($HTTP_POST_VARS['giftMessage']) && tep_session_is_registered('giftwrap_info') && isset($HTTP_POST_VARS['giftwrap_card'])) { $giftwrap_message = tep_db_prepare_input($HTTP_POST_VARS['giftMessage']); }else{ tep_session_unregister('giftwrap_message'); } } else { // no Giftwrap modules enabled/installed $giftwrap_info = false; } } // get all available giftwrap quotes $quotes1 = $giftwrap_modules->quote1(); //EOF osc_Giftwrap Thanks for the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.