Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Giftwrap option not showing?


LisaT

Recommended Posts

I've installed the giftwrap cont. and it's Ok except on checkout_shipping.php, the customer is not offered the choice of giftwrap or not. Please see Get the Giftand you will see what I mean. The giftwrap box is there, but not the radio selection button.

Any idea what I've missed?

Link to comment
Share on other sites

Are there any known conflicts between this giftwrap cont. and STS? I successfully added teh giftwrap cont. to another site, but on my present site I find that the radio buttons and message areas are not shown in checkout_shipping.php. I've checked the code over and over and cannot see anything wrong. I've now had to remove the giftwrap code from my files. The only difference between the 2 sites is that the present one has STS installed.

Any ideas??

Link to comment
Share on other sites

Are there any known conflicts between this giftwrap cont. and STS? I successfully added teh giftwrap cont. to another site, but on my present site I find that the radio buttons and message areas are not shown in checkout_shipping.php. I've checked the code over and over and cannot see anything wrong. I've now had to remove the giftwrap code from my files. The only difference between the 2 sites is that the present one has STS installed.

Any ideas??

Lisa, I'm having the same problem and I don't have STS installed, so I don't think that's your problem. I'll let you know when I find an answer.

 

Regards,

 

Grayson

Grayson Morris

Link to comment
Share on other sites

Alright, I've found the problem. In catalog/includes/modules/giftwrap, open up giftwrap.php and nogiftwrap.php. You'll see that they're pretty much the same, except that in nogiftwrap.php, a few lines still have "shipping" in them, which is clearly wrong (leftover from the copy-and-change, I presume). Make the following fixes in nogiftwrap.php:

 

Change (about line 25):

 

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {

 

to

 

if ( ($this->enabled == true) && ((int)MODULE_GIFT_ZONE > 0) ) {

 

and change (about line 67):

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('NoGiftWrap Zone', 'MODULE_SHIPPING_ZONE', '0', 'If a zone is selected, only enable this giftwrap method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");

 

to

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('NoGiftWrap Zone', 'MODULE_GIFT_ZONE', '0', 'If a zone is selected, only enable this giftwrap method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");

 

 

That should do the trick (it did for me).

 

Regards,

 

Grayson

Grayson Morris

Link to comment
Share on other sites

  • 1 month later...
Hi Grayson,

 

No. I've looked through my files and I don't see any reference to SHIPPING at all. I must have a different gremlin in my system!!

 

 

I have the same problem. :huh:

So I make these changes:

 

 

add a second javascript function after the function selectRowEffect:

 

function selectRowEffectGift(object, buttonSelect) {

if (!selected) {

if (document.getElementById) {

selected = document.getElementById('defaultSelected');

} else {

selected = document.all['defaultSelected'];

}

}

 

if (selected) selected.className = 'moduleRow';

object.className = 'moduleRowSelected';

selected = 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;

}

}

 

 

change:

 

if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) {

echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

} else {

echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

}

 

 

to

 

if ( ($quotes1[$i]['id'] . '_' . $quotes1[$i]['methods'][$j]['id'] == $giftwrap_info['id']) || (tep_count_giftwrap_modules() == (int)1) ) {

echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n";

} else {

echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffectGift(this, ' . $radio_buttons . ')">' . "\n";

}

 

 

 

Best Regards

Frank

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...