Jump to content
Latest News: (loading..)

Recommended Posts

@@gvv

Did you add the "new files" and installed the new product_info module under Modules -> Content -> wishlist?

And before you do this backup the two tables that are mentioned in the upgrade manual.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@gvv

 

Just to make sure I installed my old version of the wishlist and did the upgrade.

All is working just fine. Maybe you made a mistake during the upgrade. Please check your code changes and make sure you did all correct.

 

There were a few typos(small mistakes) inside the upgrade manual which I corrected and will upload to the addons area.

But those mistake had nothing with your problem.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

I now understand why it is so. I removed this line from product_info.php:

 

<div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>

 

 

what do You think, is there any solution, if I wanna remove that line (remove 'add to cart'button)? 

 

If you want to remove the add-to-cart button but use the wishlist function, keep the hidden field intact.

 

<div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>

Share this post


Link to post
Share on other sites

Found another typo in the upgrade manual. I hope I got them all now.

Forgot to add the SQL to drop the old Wish List settings from the table configuration and configuration_group.

This step must be done before installing the new modules.

If you installed the new modules already just run the SQL from the upgrade manual and re-install the product_info module.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@grandpaj

 

Thanks for your feedback John!

 

Which version did you install?

Did you have any trouble during the upgrade?

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

Hi Lambros

 

Installed the latest version from Add-ons site.

Absolutelty no problems at all, and if anyone could create a problem, as you know it would be me.

 

Just one very minor point, is it possible to change the width if the 2 buttons  "Add New Recipent" " Remove New Recipient" or would this create problems.

 

Cheers and thanks

 

Grandpa

Share this post


Link to post
Share on other sites

@@grandpaj

 

Thanks for another feedback John! Appreciated! :thumbsup:

 

Regarding the buttons;

Inside the wishlist.php look for this code

<script>
function addNewEmailField() {
  $('#EmailList').append('<div id="added"><div class="form-group has-feedback"><label for="recvName" class="control-label col-sm-3"><?php echo TEXT_NAME . ':'; ?></label><div class="col-sm-6"><?php echo tep_draw_input_field('friend[]', NULL, 'id="recvName" placeholder="' . TEXT_NAME . '"'); echo FORM_REQUIRED_INPUT;?></div></div><div class="form-group has-feedback"> <label for="recvEmail" class="control-label col-sm-3"><?php echo TEXT_EMAIL . ':'; ?></label> <div class="col-sm-6"><?php echo tep_draw_input_field('email[]', NULL, 'id="recvEmail" placeholder="' . TEXT_EMAIL . '"'); echo FORM_REQUIRED_INPUT;?></div></div><hr /></div></div>');
$('.button_more').replaceWith('<div class="row button_added"><div class="col-sm-6"><a class="btn btn-default btn-block" role="button" href="#" onclick="addNewEmailField();return false;"><i class="glyphicon glyphicon-plus"></i><?php echo TEXT_WISHLIST_ADD_EMAIL; ?></a></div><div class="col-sm-6"><a class="btn btn-default btn-block" role="button" href="#" onclick="removeEmailField();return false;"><i class="glyphicon glyphicon-minus"></i><?php echo TEXT_WISHLIST_REMOVE_EMAIL; ?></a></div></div>');
}
function removeEmailField() {
  $('#added').remove();
}
</script>

and replace with this

<script>
function addNewEmailField() {
  $('#EmailList').append('<div id="added"><div class="form-group has-feedback"><label for="recvName" class="control-label col-sm-3"><?php echo TEXT_NAME . ':'; ?></label><div class="col-sm-6"><?php echo tep_draw_input_field('friend[]', NULL, 'id="recvName" placeholder="' . TEXT_NAME . '"'); echo FORM_REQUIRED_INPUT;?></div></div><div class="form-group has-feedback"> <label for="recvEmail" class="control-label col-sm-3"><?php echo TEXT_EMAIL . ':'; ?></label> <div class="col-sm-6"><?php echo tep_draw_input_field('email[]', NULL, 'id="recvEmail" placeholder="' . TEXT_EMAIL . '"'); echo FORM_REQUIRED_INPUT;?></div></div><hr /></div></div>');
$('.button_more').replaceWith('<div class="row button_added"><div class="col-sm-3"><a class="btn btn-default" role="button" href="#" onclick="addNewEmailField();return false;"><i class="glyphicon glyphicon-plus"></i><?php echo TEXT_WISHLIST_ADD_EMAIL; ?></a></div><div class="col-sm-3"><a class="btn btn-default" role="button" href="#" onclick="removeEmailField();return false;"><i class="glyphicon glyphicon-minus"></i><?php echo TEXT_WISHLIST_REMOVE_EMAIL; ?></a></div></div>');
}
function removeEmailField() {
  $('#added').remove();
}
</script>

Is this better?

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Hi
 
yes it's possible with a little trick! :rolleyes:
In includes/modules/product_listing.php somewhere around the buttons area add (depends on where you want to have the wishlist button):

$prod_list_contents .= '       <div class="col-xs-6">' . tep_draw_form('cart_quantity', tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'action=add_product')) . tep_draw_hidden_field('products_id', $listing['products_id']) . tep_draw_button(TEXT_ADD_WISHLIST, 'glyphicon glyphicon-heart', null, 'primary', array('params' => 'name="wishlist" value="wishlist"')) . '</form ></div>';

J.J.
 

Share this post


Link to post
Share on other sites

@@gvv @@De Dokta

 

Thanks for the code J.J. :thumbsup:

Be aware that a button inside the product listing works only if the product doesn't have attributes.

Other solution would be to build in the same redirect to the application_top.php for thew wishlist button, similar to the buy now button.

If attributes -> redirect to product_info.php else -> add to wishlist.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Be aware that a button inside the product listing works only if the product doesn't have attributes.

Other solution would be to build in the same redirect to the application_top.php for thew wishlist button, similar to the buy now button.

If attributes -> redirect to product_info.php else -> add to wishlist.

@@Tsimi

 

Yes, you are right! :-

The only way to add a wishlist button to the product_listing seems to be to define a new case 'add_to_wishlist' in application_top:

 

Right before:  case 'notify' :         if (tep_session_is_registered('customer_id')) {

insert:

/*Wish List */
     case 'add_to_wishlist' : if (isset($_GET['products_id'])) {
                               if (tep_has_product_attributes($_GET['products_id'])) {
                               tep_redirect(tep_href_link('product_info.php', 'products_id=' . $_GET['products_id']));
                                } else {
                               $wishList->add_wishList($_GET['products_id'], $wishList->get_quantity($_GET['products_id'])+1);
                               }
                              }
                              tep_redirect(tep_href_link('wishlist.php', tep_get_all_get_params($parameters)));
                              break;
/* /Wish List End */                         

And then in product_listing add something like:       

 $prod_list_contents .= '       <div class="col-xs-6">' . tep_draw_button(TEXT_ADD_WISHLIST, 'glyphicon glyphicon-heart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_to_wishlist&products_id=' . $listing['products_id']), NULL, NULL, 'btn-default btn-sm') . '</div>';

Works for me on bs-gold........

 

J.J.

Edited by De Dokta

Share this post


Link to post
Share on other sites

@@Tsimi Lambros I see that wdepot posted a change or two to the 2.3 Wishlist version...I'm about to install your bootstrap version but just before I do I thought I'd ask if you are planning to update your version to pick up the changes made by wdepot? 

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole

 

Hi Dan

 

I haven't looked at the changes that wdepot made, yet. I am not even sure that those changes are for Bootstrap.

 

You can download his latest package once and also download my latest BS version and see if those changes affect anything inside the BS version.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

I didn't look at them closely but from the description it sounded like they should be included in the bootstrap version as well. One of them for sure.

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole

 

So I looked at those updates from wdepot

 

There were 3 things

 

1.)  1 May 2015

 

Small fix inside the application_top.php file

 

2.) 9 May 2015

 

This is just a notification to those that have customers with large wishlists. I don't know who would add that many products to a wishlist but hey, who am I to judge right?

I will add this notification to the install manual in my next update. It is not a necessary change at least not for now.

 

3.) 10 May 2015

 

This is similar to what De Dokta already posted in post #63

wdepot added a new action to the application_top.php which will allow you to add the add to wishlist button in other places like the product listing or any other place besides the product info page.

I will add De Doktas code from post #63 to my next update.

 

And additional to all that I will create my own Wishlist Addon Place to avoid future conflicts or confusions with versions from wdepot since he only updates the non-BS version.

So download my latest BS version, apply the application_top.php fix and you are good to go.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

Thanks Lambros...I'll install it and let you know how it goes.  On my todo for tonight.

 

Dan

Share this post


Link to post
Share on other sites

@@Dan Cole

 

Hi Dan

 

Please tell me when you are done with the install and if there are any issues the should be addressed.

Once you are all good and done I will create a new package and upload it to the add-ons area.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Moved the whole addon to its own place to avoid confusions with the normal version that wdepot maintains.

 

http://addons.oscommerce.com/info/9313


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

Sorry for not getting back to you quicker Lambros.   I did install the Wishlist add-on but got a bit side tracked....it seems that the navbar.php file I was using, was vastly different from the one in the latest GOLD release.  Replacing the file was simple enough but then I got hung up fiddling with what navbar items I wanted and formatting them etc. -- some of the css selector names changed too.   In any case, while I haven't done any extensive testing of the wishlist module itself, it does seem to work and I didn't have any problems installing it outside of the issue I had with the navbar, which obviously has nothing to do with your contribution. 

 

The documentation is will done and the code changes were easy to understand, find and replace.  Excellent work as usual Lambros! 

Share this post


Link to post
Share on other sites

GREAT mod, thanks.  I am using osc 2.3.4 BS Gold and installed it without a hitch.  Downloaded mod from here:  http://addons.oscommerce.com/info/9313/v,23

 

Noticed no sql instructions so got those from the forum here and executed.  Everything seems to work except when I am in a product, add it to wishlist, it adds it to cart (and NOT the wishlist box on the right).  install instructions have been gone over twice and one section of code is properly put before shopping cart functions.   So in further digging noticed this:  http://addons.oscommerce.com/info/8665 and the May 10th files seem to be vastly different from the BS version, is this not the BS version? 

 

Didn't see a wishlist help file in the BS version.

 

Would like to get this to work but a little stumped at BS in two places?

Edited by Gerald60b

Share this post


Link to post
Share on other sites

You don't need to add any database stuff yourself. It will install automatically with the module once installed through the admin area. Make sure you also activate all modules mentioned in the manual.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×