Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tsimi

♥Ambassador
  • Posts

    2,353
  • Joined

  • Last visited

  • Days Won

    85

Everything posted by Tsimi

  1. Found a dirty solution. Now the module contents shows at the most bottom or better said after the E-Mail Notifications part. The default account page is build with 3 blocks/groups "account", "orders", and "notifications" The following module code will add the Points and Rewards block after the notifications block. function execute() { global $oscTemplate, $language, $customer_id, $currencies; if (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') { require_once('includes/functions/redemptions.php'); $has_points = tep_get_shopping_points($customer_id); $oscTemplate->_data['account']['notifications']['links']['points_title'] = array('title' => '<h2>' . MODULE_CONTENT_ACCOUNT_POINTS_TITLE . '</h2>', 'link' => NULL, 'icon' => NULL); $oscTemplate->_data['account']['notifications']['links']['points'] = array('title' => '<div class="alert alert-info">' . sprintf(MODULE_CONTENT_ACCOUNT_POINTS_CURRENT_BALANCE, number_format($has_points, MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue($has_points))) . '</div>', 'link' => NULL, 'icon' => NULL); $oscTemplate->_data['account']['notifications']['links']['view'] = array('title' => MODULE_CONTENT_ACCOUNT_POINTS_VIEW, 'link' => tep_href_link('my_points.php', '', 'SSL'), 'icon' => 'fa fa-plus'); $oscTemplate->_data['account']['notifications']['links']['view_help'] = array('title' => MODULE_CONTENT_ACCOUNT_POINTS_VIEW_HELP, 'link' => tep_href_link('my_points_help.php', '', 'SSL'), 'icon' => 'fa fa-info-circle'); } } If you change ['notifications'] to ['account'] or ['orders'] it will show below those groups. Make sense? If I use ['tags'] it will show the Points and Rewards block at the most top which is what we want to avoid.
  2. @raiwa Tried your suggestion but no luck. Here the module if you want to give it another try. account module.zip I also prefer the Points and Rewards part to be at the bottom of the account page. If we cannot reach that then we should stick with the code change as is in install step 1
  3. @burt Never mind the links in the language files I moved them to the module. So only thing left is the sort order. Is there any way to get that to work? Move the Points block to the most bottom. @raiwa What do you think? Does it matter if the Points and Rewards block is at the top or should it be at the bottom?
  4. @burt Small update regarding the account stuff. I was able to show now all 3 rows that we need. I needed to use links inside the language file which I am not sure is the right way. Here the code I used function execute() { global $oscTemplate, $language, $customer_id, $currencies; if (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') { require_once('includes/functions/redemptions.php'); $has_points = tep_get_shopping_points($customer_id); $oscTemplate->_data['account']['tags']['title'] = MODULE_CONTENT_ACCOUNT_POINTS_TITLE; $oscTemplate->_data['account']['tags']['links']['tag'] = array('title' => '<h4><span class="label label-info">' . sprintf(MODULE_CONTENT_ACCOUNT_POINTS_CURRENT_BALANCE, number_format($has_points, MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue($has_points))) . '</span></h4>' . TEST, 'link' => NULL, 'icon' => NULL); } } and the language file define('MODULE_CONTENT_ACCOUNT_POINTS_TITLE', 'My Points and Redemptions'); define('MODULE_CONTENT_ACCOUNT_POINTS_DESCRIPTION', 'Shows Points and Rewards block on account.php page'); define('MODULE_CONTENT_ACCOUNT_POINTS_PUBLIC_TITLE', 'My Points and Redemptions'); define('MODULE_CONTENT_ACCOUNT_POINTS_CURRENT_BALANCE', 'Shopping Points Balance : %s points. Valued at : %s '); define('MODULE_CONTENT_ACCOUNT_POINTS_VIEW', 'View my Points Balance and Points received.'); define('MODULE_CONTENT_ACCOUNT_POINTS_VIEW_HELP', 'Reward Point Program FAQ.'); define('TEST', '<i class="fa fa-plus"></i> <a href="' . tep_href_link('my_points.php', '', 'SSL') . '">' . MODULE_CONTENT_ACCOUNT_POINTS_VIEW . '</a><br><i class="fa fa-info-circle"></i> <a href="' . tep_href_link('my_points_help.php', '', 'SSL') . '">' . MODULE_CONTENT_ACCOUNT_POINTS_VIEW_HELP . '</a>'); As you can see I used the TEST definition to add the additional 2 rows. Too bad that we cannot set the sort order for the whole block. I don't really like it being at the most top. But maybe that is just me.
  5. @burt I was trying to implement that account part as module. I was able to show the title and 1 row of text with link. Our Points and Rewards system normally should show 3 rows and 1 title inside the account area. All the account modules that are available to me as reference only show how to implement 1 row and 1 title only. How can I add more rows? Do I need a module for each row?
  6. @raiwa Fix for referrals page is good. I can't recreated the pending page error anymore so let's ignore that for now until we know how to recreate it again.
  7. @burt Now I see and understand how the account page works. I can now implement the first install step into a module. It was easier then I thought. Thanks.
  8. @raiwa I merged your latest changes manually and added the missing install check messages into all necessary module language files. I added a pull request but github says there is a conflict with one of the German language files, not sure exactly what is not matching, but only you can fix it since you are the one with write permission.
  9. @burt Interesting... I still have your files. I will go through them and see how you did it. Now I am gonna grab a glass of nice red vine and watch "The Expanse", which I can highly recommend. The next best Sci-Fi thing to Star Trek: Discovery or maybe even better. Sorry, went a bit off topic there...
  10. @raiwa I just finished converting all image buttons to jquery UI buttons. Also fixed/adjusted the text for English, German and Spanish to match/fit the new buttons. I will submit a pull request shortly then you can take a look at it if time allows. Regarding the copyright sample I will get that done tomorrow if that's OK. Also something I encountered and would like anyone to check and confirm this errors. On the Referral page admin I get these errors admin/customers_points_referral.php On the Pending page admin area I get these errors admin/customers_points_pending.php When deleting points I get this error on the delete confirmation
  11. @burt Regarding that account page. Well it is somewhat modular but you need to add a piece of code to be able to show something on that page. For example we needed to add 4 new globals and this following piece of code to be able to show the points and rewards part on the account page. // BOF POINTS REWARDS BS //--> if (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') { require('includes/languages/' . $language . '/modules/pages/tp_account.php'); require_once('includes/functions/redemptions.php'); $output .= '<h2>' . TP_ACCOUNT_MY_POINTS_TITLE . '</h2> <div class="contentText"> <ul class="list-unstyled">'; $has_points = tep_get_shopping_points($customer_id); if ($has_points > 0) { $output .= '<h4><span class="label label-info">' . sprintf(TP_ACCOUNT_MY_POINTS_CURRENT_BALANCE, number_format($has_points, MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue($has_points))) . '</span></h4>'; } $output .= '<li><i class="fa fa-plus"></i> <a href="' . tep_href_link('my_points.php', '', $request_type) . '">' . TP_ACCOUNT_MY_POINTS_VIEW . '</a></li> <li><i class="fa fa-info-circle"></i> <a href="' . tep_href_link('my_points_help.php', '', $request_type) . '">' . TP_ACCOUNT_MY_POINTS_VIEW_HELP . '</a></li> </ul> </div>'; } // EOF POINTS REWARDS BS //--> It is not really much but it is "touching core code" and that is what we try to avoid as much as possible. Even though this is just a code addition and not a code replacement or core code change. If that account page would be same modular as the navbar or header we could have all those elements (My Account, My Orders, E-Mail Notifications) as modules, give them a sort order and rearrange that page to what ever we like. Need a new "group"? Drop in module, install, set sort order done. Lot easier don't you think? If I wanted to change the way that page look I would need to touch the tp_account.php code which is not ideal, I think.
  12. @burt Thanks! The only thing that comes to mind at the moment is the ...modules/pages/tp_account.php site. That page is kinda awkward. Wouldn't it be possible to have that coded like the other modules stuff. For example like the navbar modules. That would make adding pieces easier and consistent to other modularized pages. @raiwa did most of the coding improvements (hooks and modules) so you'll have to ask him.
  13. Roger that. I'll wait for your PM. Meanwhile I will try to implement those jquery buttons in the admin files.
  14. @raiwa I can do that if you tell me what copyright exactly you had in mind. The current copyright includes a dead URL. I am glad that my German was not as bad as I thought. I was sure that you will have to redo half of it. I am glad that wasn't the case.
  15. Agree. What you think about the text/message in the product info page? Should that be also changed to an alert type message or keep it as label or maybe use Contextual backgrounds instead? Oh and btw. I just installed the latest package and the warning messages in the admin area for the not installed modules is a genius move. Well done!
  16. @raiwa I just finished the German translation and added the files to my fork. I also opened a pull request.... I think/hope. I don't have German installed in my test shop at the moment so I would appreciate if you could quickly go over them to see if my German is not wrong spelled or expressed. This was by far the most tedious and disliked part of work (for me) in this project.
  17. @discxpress Thank you. A very large part of the credit goes to @raiwa for his iron will and effort into this small project. If he wouldn't come along and started his github repository this Points feature would most likely have been forgotten. Also credits to @LeeFoster for joining us and fixing most of the bugs in a very short time. Please fell free to change the looks of the messages or the appearance of the FAQ site or account part. We haven't had much time to play with the bootstrap code yet. If you come up with something nice looking please share.
  18. @LeeFoster My thought exactly. What would be a reason to separate the points? I can't think of any. Then we need to fix the English text aswell.
  19. @raiwa While I was translating the FAQ I found this following sentence in FAQ4 I thought it is not possible to "choose or write" the amount of points to be used, right? It is all or nothing as far I can remember.
  20. I was just thinking about Lecarl. He wants to use this "maybe" in a live store and if he uses PP Standard he will have to do the necessary changes right? Would be great if we could have a live shop guinea pig to test the Points system.
  21. @raiwa What about the PayPal Standard payment method? I think that needs coding too right?
  22. I couldn't auto merge the latest changes anymore so I just did a clean fork again. I will try to install this new package into a new, fresh Edge test store and see how it goes. Still working on the translation and also working on those buttons. Time is just not my friend recently but I haven't forgotten about it.
  23. Oh, good to know about the button template. I made mine in Photoshop. But you're right we should use the jquery UI buttons. I think I tried to implement them once but failed. I'll just give it another try.
  24. @raiwa Just finished the German translation including buttons for the whole admin side. I hope I can get the catalog side done in the next few days. Just wondering is there a button creator site or does everyone make those admin buttons from scratch?
  25. @raiwa Ah! That would be nice! So people won't miss an important module install. And yes add the infobox and footer line into the template files but you will have to point that out otherwise people might miss that.
×
×
  • Create New...