Jump to content

Community

IPCommerceFan

+Clients
  • Posts

    409
  • Joined

  • Last visited

 Content Type 

Profiles

Downloads

IPS4 Providers

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Forums

Store

Everything posted by IPCommerceFan

  1. Love love love this! Can you confirm whether Commerce support ticket replies will generate these push notifications??
  2. We most likely won't use Zapier, but I really look forward to THIS reaching self-hosted customers! Its the only barrier for us to upgrade from 4.4.x to 4.5+!
  3. Hi, You can disable individual modules here: AdminCP -> System -> Applications Just click where it says "Enabled" to disable it.
  4. What happens if you echo $select->query, and copy the query into phpmyadmin or some other mysql console? Does the query look like you think it should? Often times I've used this method to figure out a syntax error in the php version of the query.
  5. Underflow exception would indicate there aren't any results for the query, I've seen. If it is normal for this query to sometimes not return a result, then you may need to try: {{ try { $select = \IPS\Db::i()->select( 'cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID', 'cms_custom_database_12', array( array( 'field_156=?', $row->primary_id_field ), array( 'field_141=?', 1 ) ), 'cms_custom_database_12.field_142 ASC')->join( 'cms_custom_database_13', 'cms_custom_database_13.primary_id_field=field_155', 'INNER' )->first(); } catch( \UnderflowException $e ) { $select = ''; } }} Do you get any results when you run this query in mysql directly? SET @field_156 ='yourdata'; SELECT cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID FROM cms_custom_database_12 INNER JOIN cms_custom_database_13 ON cms_custom_database_13.primary_id_field = cms_custom_database_12.field_155 WHERE field_156 = @field_156 AND field_141=1 ORDER BY cms_custom_database_12.field_142 ASC LIMIT 1;
  6. I hope this isn't stating the obvious, but what happens when you try this? {{$select = \IPS\Db::i()->select( 'cms_custom_database_12.field_142 as preco, cms_custom_database_12.field_154 as link, cms_custom_database_12.record_updated as atualizado, cms_custom_database_13.field_143 as loja, cms_custom_database_13.record_image_thumb as logo, cms_custom_database_13.field_160 as cupom, cms_custom_database_13.field_161 as cupom_valor, cms_custom_database_13.primary_id_field as loja_ID', 'cms_custom_database_12', array( array( 'field_156=?', $row->primary_id_field ), array( 'field_141=?', 1 ) ), 'cms_custom_database_12.field_142 ASC')->join( 'cms_custom_database_13', 'cms_custom_database_13.primary_id_field=field_155', 'INNER' )->first();}}
  7. That should work, however I would verify by testing on a single post first. After REPLACE(), add WHERE pid = 1234; (post ID of a post that contains the emoji you're replacing)
  8. ^ This was indeed useful for me. I migrated my cpanel account to a new server yesterday, which also involved updating from MySQL 5.6 to 5.7 and PHP 7.2->7.3. No changes to IPS install (4.4.10) Everything went off without a hitch! Site back up and running without issue, except apparently nothing was being written to the nexus_customers table when a guest would check out. This did not affect registered members. I managed to repro the issue and see the error, which was exactly the above! IPS\Db\Exception: Field 'sfsMemInfo' doesn't have a default value (1364) Its really curious this didn't show itself until I moved the server and updated mysql and php. Its unclear which of those revealed the issue. In any case, this was a huge help. Thanks @FabioPaz and @Daniel F (I opted to just drop the columns)
  9. I would use a "pay what you want" feature for support requests. We often have customers so appreciative of our service that they ask us how they can send us a little extra something just for the after-sales support we deliver. Support Request departments have a "Submission Charge" option, so we would have the value be "pay what you want", in that use case.
  10. Just want to say a Printful integration would be amazing. Not saying it needs to be core functionality, however if an application/plugin were available in the market for such integration, it would be a godsend.
  11. We use Callum's application as well. It does the trick for us.
  12. Wow, very different. Thank you for sharing!
  13. Indeed, this requires 4.4.10. I tried to cut it down to use less of the source, but it failed if I didn't include it because its calling $paymentMethodOptions. What would be the proper way, if you don't mind?
  14. Yup just install it as a plugin. I tested on my dev and live site, so it should be good.
  15. Hi, There isn't a built-in option to make Account Credit the default option, however this plugin will do it! Commerce - Account Credit by Default.xml Account Credit selected by default at checkout: This modifies \IPS\nexus\modules\front\checkout\checkout, and is actually just one small change to the form. Instead of the default option being NULL, it is now 0. (Account Credit is technically payment method 0). If there is no account credit, it goes back to not making a specific default selection (NULL): if ( \count( $paymentMethodOptions ) > 1 ) { if ( \IPS\nexus\Customer::loggedIn()->cm_credits[ $this->invoice->currency ]->amount->isGreaterThanZero() ) { $form->add( new \IPS\Helpers\Form\Radio( 'payment_method', 0, TRUE, array( 'options' => $paymentMethodOptions, 'toggles' => $paymentMethodsToggles ) ) ); //0 after 'payment_method' means 0 aka account credit will be the default payment method. } else { $form->add( new \IPS\Helpers\Form\Radio( 'payment_method', NULL, TRUE, array( 'options' => $paymentMethodOptions, 'toggles' => $paymentMethodsToggles ) ) ); } } Hope this helps!
  16. I needed this to be more robust, so I started poking around and discovered I could hook into \IPS\Helpers\Form\Text --> validate() and use custom php to do any kind of validation I want on a given custom commerce field! (custom Text field anyway, I haven't explored other types) In case anyone is need of this and finds this thread during their search, this is where you can run custom validation: //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class hook491 extends _HOOK_CLASS_ { /** * Validate * * @throws \InvalidArgumentException * @throws \DomainException * @return TRUE */ public function validate() { $dataToBeValidated = $this->value; //$this->value is anything that is entered into any field on the order form. /* * Run any if statement on your data to determine whether it should return false, some specific value, etc */ if ($dataToBeValidated > 0) { $validation == 1; } //"$this" doesn't know the id of the field, but it knows the name. Here we will evaluate the value entered for the Nexus package custom field with an ID of 5. ( nexus_packages_fields.cf_id in the database ) if ( $this->name == 'nexus_pfield_5' and $validation == 1 and !preg_match('/[A-Z0-9]+/i', $dataToBeValidated) ) //we can add any number of conditions to decide whether the field should be validated or not { throw new \InvalidArgumentException( 'form_bad_value_nexus_pfield_5' ); //added langauge bit to dev\lang.php "'form_bad_value_nexus_pfield_5' => 'Custom validation failure message'" } return parent::validate(); } } Hope this helps someone, and if there is a better way, I'm open to suggestions!
  17. Glad I could help! Nice site btw, makes me feel like installing GTA5 again 😄
  18. You're welcome! This piqued my interest, so I gave it a shot: AdminCP Commerce Display Name.xml It works as far as I can tell/tested, but this should do it! In case its of interest, heres what this plugin consists of: We hooked into \IPS\nexus\Support\Author\Member to change the name on the sidebar: //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class hook479 extends _HOOK_CLASS_ { /** * Get name * * @return string */ public function name() { if( !\IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'customers_view_statistics' ) ) { return $this->customer->name; } else { return $this->customer->cm_name; } return parent::name(); } } and we hooked into \IPS\nexus\Customer to change the name on each reply: //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class hook480 extends _HOOK_CLASS_ { /** * Get customer name * * @return string */ public function get_cm_name() { if( !\IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'customers_view_statistics' ) ) { return $this->name; } else { return ( $this->cm_first_name or $this->cm_last_name ) ? "{$this->cm_first_name} {$this->cm_last_name}" : $this->name; } return parent::get_cm_name(); } } In order to make full names display as their respective Display Name, just make sure the administrator you want to restrict has "Can view customer statistics?" disabled: I'm no developer, but I'm open to feedback in case you want this plugin to do something else. Hope it helps!
  19. There is no built-in switch for this. Could you provide a screenshot showing the exact areas where you see the first/last name? My feeling is this would likely be doable via a custom plugin. Possibly a switch that can be added to this group of admin restrictions: For the front end support module, this plugin would make it so the customer sees their display name instead of their first/last aka their "customer name": Change Commerce cm_name to name.xml
  20. Thanks for sharing. We ran into an issue with a customer not being able to register due to inexplicably failing the security check. Whitelisted their email and IP to no avail. Registered them manually then tried to reproduce it, but failed. I also wrote a plugin that adds the "Title" field to the Contact Us form, but the additional field sometimes causes captcha to fail as well, so I had to disable the plugin. Captcha is flaky in general in my experience, unfortunately.
  21. I'm interested in the concept of Invision integrating with Zapier in terms of events, triggers, and actions! We use and rely on the 3rd party "Rules" app, and the uncertainty as to whether it'll work with each new version of Invision Community has had me a little on edge. lol It'd be wonderful if these same "ETA"'s could be used internally, as in Invision --> Invision. e.g. If member registers --> create a post in the forum e.g. If customer makes a purchase --> Queue up a follow-up email for 30 days from the purchase date. Regardless of any of that, this is great!
  22. I don't think there is a built-in way to apply Acronyms to older posts, however you could do this via the database. UPDATE forums_posts SET post = REPLACE( post, 'SKU', '<abbr title=\"Stock Keeping Unit\">SKU</abbr>') WHERE post LIKE '%SKU%' AND post_date < 1576891227; 1576891227 would be the date/time in unix time just before you started using acronyms. This is a handy tool for figuring the exact value out: https://www.epochconverter.com/ This SQL script may be "dangerous" to use unless you are absolutely certain there are no OTHER instances of the acronym you're trying to replace, so I would carefully consider its implementation, and definitely make a backup of the forums_posts tables before experimenting with it. e.g. as part of a URL, or part of another word.
  23. Hmm, I just logged in as a test user and got a notification when I created a ticket via AdminCP for the user. How are you creating the ticket?
×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy