Jump to content

IPCommerceFan

Clients
  • Posts

    493
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by IPCommerceFan

  1. 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.

  2. As far as brainstorming goes, I think its a good idea to voice our expectations of such a mod, but I also feel that any developer that takes this on in earnest should be able to get an application/plugin 90% of the way there without the need for a whole lot of feedback. 

    Unlike a site-specific request for customization, I feel an integration should essentially just connect as many end points as possible between one platform and the next (Payment, shipping, product listing), and implementation should be driven by the dev's willingness to explore and understand how both commerce and printful work. (signing up for a printful dev account, creating test products, using sandbox features, etc).

    All in all, I feel it would be a non-starter if we had to spell out everything this type of integration should do from the get-go.

    As for how I'd use it, I'd love to be able to create a blank product in Commerce (just to generate a package id), link it to a product I created on Printful (perhaps by entering the product ID of my product on printful into a field on the commerce side), and have the ability to sync pricing, stock level (if applicable), size, color, etc into the blank "shell" of a product.

  3. 12 hours ago, breatheheavy said:

    i did a thing GIF

    Love that you see the value is in this. Printful is amazing. IPB is amazing. They're a match!

    Yup, we've run our business exclusively using Nexus/Commerce/Downloads since 2012, so this has a lot of value for us, especially since we'd like to offer "Merch" without sending customers to another site.

    We've looked into solutions like BigCommerce, Shopify, etc in the past, but none can beat the fact that nexus is a store and support system in one.  We tried BigCommerce + ZenDesk as a proof-of-concept at one point, but it was a terrible fit for us.  CS-Cart, Magento, Freshdesk, and others were considered as well, but none could do what we really needed the software to do, which we've accomplished via plugins with Nexus/Commerce.

  4. 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:

    image.png.34112cf0c54ff8cd6c1cea0ceb063f98.png

    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!

  5. 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!

  6. 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:

    image.png.fd2cc326fc9b89553592fa2065c62501.pngimage.png.9fbcabf8ddc8ddec56213d7a5bc10a4f.png

    //<?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:

    image.png.9b0439115d81292114c84ddccb84a63a.pngimage.png.d1459420f44adcab9ee4c549f7eec8e7.png

    //<?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:

    image.png.75f14669c8c429bba77bd5f2023a8e53.png

    I'm no developer, but I'm open to feedback in case you want this plugin to do something else.  

    Hope it helps!

  7. 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:

    image.png.e114c5025b35edc832b92eab1c512ee6.png

    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

     

  8. 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.

  9. Hi,

    So, I installed Redis and configured it correctly as far as I could tell (including updating constants.php), however after some time, my AdminCP popped up a big red "Cache Not Working" message:

    Quote

    Cache Not Working

    Caching is not working correctly. Review your caching method configuration and adjust the settings as needed.

    I figured "I'll deal with this later", so I set my caching method back to what I was using before.   Now the message is still there, and won't seem to go away even after running the support tool several times.

    I even went so far as to specify - No caching -, with File System as my storage method, and "Cache page output for guests" set to disabled, because that should be a fool-proof way to eliminate any caching issue.

    If I run the support tool, which clears the cache, I can see that the cache files in datastore are indeed being cleared out and regenerated, and as far as I can tell the site is working perfectly fine.

    Unfortunately I still have the message, and am just curious if it will go away on its own via some background task running, or if I should be submitting a ticket?

    Thanks for any insight!

  10. With InvisionCommunity 4.x.x maturing and talks of 5.x.x starting to come up, I'm starting to wonder whether Commerce will survive considering a "simple" feature like this hasn't been given any attention since 2015. 

    It would go a long way for me, and my business, if topics like this could at least be given some token acknowledgement. 

    I understand having limited engineering resources since I deal with this every day as well.  Having to triage what gets attention and what doesn't, inadvertently sending the wrong message, etc.

    It would just be nice to get a "Thanks for the suggestion", or "we're considering it", or even a "no", so that we can stop wondering if posting feature requests are a worthwhile use of time, and perhaps consider other options.

  11. I got this working by modifying \IPS\nexus\Package\CustomField (the actual php file that relates to that class)!

    image.thumb.png.8639d82ff025fe08313075497d2c027b.pngimage.thumb.png.0c2e0f667139acfce9b9e60a0f4cbcfb.png

     

    All I had to do was:

    - borrow the $form->add statements for pf_max_input and pf_input_format from  \IPS\CustomField\CustomField
    - comment out the "unset" statements for those fields
    - Add the fields to the nexus_package_fields table in the database

    It works like a charm!  Now to figure out how to do what I did in the form of a plugin or application since I don't really feel comfortable with the fact I edited the source files directly...

    Still hoping IPS will roll this into the core product, but I'm very thankful for the fact the framework was intuitive enough to allow this workaround!

  12.  

    On 10/3/2018 at 4:44 PM, JustHatched said:

    I've done that, but then I lose all the css.

    Just ran into a similar problem, thought I'd share my solution here.

    When enabling IN_DEV, its important the correct boolean method is used.

    e.g., in my case:

    define('IN_DEV',  1);   = nuked css
    define('IN_DEV', TRUE); = works fine

  13. Hi, 

    I recently upgraded my site from 4.3.5 to 4.3.6 and SuperGrid seemed fine, but upon doing a FRESH install of 4.3.6 (on my test site) then immediately installing the supergrid templates and plugin, I ran into this error on the articles front page (/index.php?/articles.html/):

    Error: Call to undefined method IPS\cms\Records1::reputation() (0)
    #0 /home/testsite/public_html/applications/cms/sources/Theme/Theme.php(610) : eval()'d code(697): IPS\Theme\class_cms_database_Supergrid_FrontPage->entry(Object(IPS\cms\Records1), Object(IPS\cms\Databases))
    #1 /home/testsite/public_html/applications/cms/modules/front/database/index.php(142): IPS\Theme\class_cms_database_Supergrid_FrontPage->index(Object(IPS\cms\Databases), Object(IPS\Patterns\ActiveRecordIterator), Object(IPS\Http\Url\Friendly), Array)
    #2 /home/testsite/public_html/applications/cms/modules/front/database/index.php(51): IPS\cms\modules\front\database\_index->view()
    #3 /home/testsite/public_html/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\database\_index->manage()
    #4 /home/testsite/public_html/applications/cms/sources/Databases/Dispatcher.php(325): IPS\Dispatcher\_Controller->execute()
    #5 /home/testsite/public_html/applications/cms/widgets/Database.php(130): IPS\cms\Databases\_Dispatcher->run()
    #6 /home/testsite/public_html/applications/cms/sources/Pages/Page.php(1257): IPS\cms\widgets\_Database->render()
    #7 /home/testsite/public_html/applications/cms/sources/Pages/Page.php(2191): IPS\cms\Pages\_Page->getWidgets()
    #8 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(73): IPS\cms\Pages\_Page->output()
    #9 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view()
    #10 /home/testsite/public_html/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\pages\_page->manage()
    #11 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute()
    #12 /home/testsite/public_html/system/Dispatcher/Dispatcher.php(146): IPS\cms\modules\front\pages\_page->execute()
    #13 /home/testsite/public_html/index.php(13): IPS\_Dispatcher->run()
    #14 {main}

    also this one here /index.php?/articles.html/articles/:
     

    Error: Call to undefined method IPS\cms\Records1::reputation() (0)
    #0 /home/testsite/public_html/applications/cms/sources/Theme/Theme.php(610) : eval()'d code(779): IPS\Theme\class_cms_database_supergrid_listing->recordRow(Object(IPS\Helpers\Table\Content), Array, Array)
    #1 [internal function]: IPS\Theme\class_cms_database_supergrid_listing->categoryTable(Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
    #2 /home/testsite/public_html/system/Helpers/Table/Table.php(548): call_user_func(Array, Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
    #3 /home/testsite/public_html/applications/cms/modules/front/database/category.php(533): IPS\Helpers\Table\_Table->__toString()
    #4 /home/testsite/public_html/applications/cms/modules/front/database/category.php(40): IPS\cms\modules\front\database\_category->view()
    #5 /home/testsite/public_html/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\database\_category->manage()
    #6 /home/testsite/public_html/applications/cms/sources/Databases/Dispatcher.php(325): IPS\Dispatcher\_Controller->execute()
    #7 /home/testsite/public_html/applications/cms/widgets/Database.php(130): IPS\cms\Databases\_Dispatcher->run()
    #8 /home/testsite/public_html/applications/cms/sources/Pages/Page.php(1257): IPS\cms\widgets\_Database->render()
    #9 /home/testsite/public_html/applications/cms/sources/Pages/Page.php(2191): IPS\cms\Pages\_Page->getWidgets()
    #10 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(73): IPS\cms\Pages\_Page->output()
    #11 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(43): IPS\cms\modules\front\pages\_page->view()
    #12 /home/testsite/public_html/system/Dispatcher/Controller.php(96): IPS\cms\modules\front\pages\_page->manage()
    #13 /home/testsite/public_html/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute()
    #14 /home/testsite/public_html/system/Dispatcher/Dispatcher.php(146): IPS\cms\modules\front\pages\_page->execute()
    #15 /home/testsite/public_html/index.php(13): IPS\_Dispatcher->run()
    #16 {main}

    Can anyone else corroborate this?  Fresh 4.3.6 install (using utf8mb4 if it matters), then installing ONLY the supergrid templates and plugin (and assigning the templates to the default database).

    Thanks!

×
×
  • Create New...