Announcement

Collapse
No announcement yet.

Prevent customer order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Prevent customer order

    We have customers at times who place orders on account but are over their limit. I am wondering if there is a way to 'suspend' their customer account so they get a message, or use something like a 'HOLD' Price Group or Availability Group so that they can't add any products to the cart, or finally even a way to add a 'HOLD' option to the Order Processing in Admin so that at least the billing person can tag those customers so orders don't get picked.

    Any thoughts on this?

    #2
    You could use a customer custom field called Suspended. Make it a checkbox, and use a <mvt:if> statement on the appropriate page or pages. We do the same thing with products that we cannot currently supply. Our if statement replaces the add to cart button with some text.

    Comment


      #3
      Well I worked something out using Tool Kit availability group code sample I found on the forums. I decided to just show the On Account button to people in the OnAccount group, so if someone misbehaves we can just temporarily remove them. This way they can still order using credit cards - and other people who haven't established terms don't get confused by the button we they shouldn't be using anyway.

      Not a programmer here so someone will point out if I did something bone-headed or if there is a better way to do it with Miva's newer code.

      Note: We have been using COD as our On Account method

      Created an Availability Group > OnAccount

      On OSEL I checked for group membership

      Code:
      
      <mvt:item name="toolkit" param="agroup|acount" />
      <mvt:if expr="g.acount GT 0">
      <mvt:foreach iterator="customer_agroup" array="customer_agroups">
          <mvt:if expr="l.settings:customer_agroup:name EQ 'OnAccount'">
              <mvt:item name="toolkit" param="sassign|ingroup|true" />
          <mvt:else>
              <mvt:item name="toolkit" param="sassign|ingroup|false" />
          </mvt:if>
      </mvt:foreach>
      </mvt:if>
      then in the payment methods section I put this messy bit which on finding the On Account (COD) method will add an onclick event (not related to my main issue here, it just shows a previously hidden div with some info for On Account customers) and show or hide the button

      Code:
      input type="radio" name="PaymentMethod" value="&mvte:method:module;:&mvte:method:code;" id="l-&mvte:method:name;-&mvte:method:code;" &mvt:method:checked;
      <mvt:if expr="l.settings:method:code EQ 'COD'"><mvt:if expr="g.ingroup EQ 'true'">onclick="showOnAcct();<mvt:else>style="display:none"</mvt:if>"</mvt:if>>
      
      <mvt:if expr="g.ingroup EQ 'true'">
      <img src="&mvt:method:image;<mvt:if expr="l.settings:method:code EQ 'COD'">graphics/00000001/onacct.png</mvt:if>">
      <mvt:else>
      <mvt:if expr="l.settings:method:code NE 'COD'"><img src="&mvt:method:image;"></mvt:if>
      </mvt:if>
      It ain't pretty but seems to work okay.
      Last edited by habreu; 01-20-17, 04:30 PM.

      Comment

      Working...
      X