PharmacyWire shortcodes

Shortcodes are a feature of WordPress that allows a tag to be inserted into post content to embed some functionality in that content. The PharmacyWire WordPress plugin features several shortcodes that can be used as follows:

[PharmacyWire drug=”<product>” {filter=”brand|generic”} {rxrequired=”yes|no|both”} {country=”ISO”} {strength=<strength>} {match=<regex>}]
Embeds a list of products that match the <product> name, and any other products that have the same active ingredient. Each product package listed will have a ‘Buy’ link using the site theme to add the product to their cart.

Additional parameters can be used to filter the results even further:

  • filter – this keyword will limit the results to either brand or generic drugs only
  • rxrequired – can show only prescription items; only OTC items; or both (the default when this keyword is not used)
  • strength – limit the results to only the strength indicated – only numeric values are applied
  • match – in some cases, matching ingredient results are too broad, so the match keyword is used to filter the results to more accurately represent what the content writer wishes to display. This is a regular expression field, so please contact us if you need additional help configuring these

Example: [PharmacyWire drug=”zocor”]

[PharmacyWire ingredient=”<drugname>”]
Embeds a list of products that use the <drugname> ingredient in the drug composition. Each product package listed will have a ‘Buy’ link using the site theme to add the product to their cart if all products have identical ingredient compositions. If the drugs have different ingredient compositions, some of which use the specified <drugname>, then the drugs will be listed with links to the appropriate products.

Example: [PharmacyWire ingredient=”Irbesartan”]

[PharmacyWire condition=”<condition>” {related=”<drugname>” limit=”<number>”}]
Generates a list of links to all products that can be used to treat the <condition> specified.

Use the ‘related’ keyword to show all drugs of ‘condition’ that are related to the specified ‘drugname’. Provides the ability to link to other drugs of a similar type to the one being described on a specific page and ensure that the drug on the page is not included on the list. By adding ‘limit’, only the ‘number’ of drugs will be shown.

Example: [PharmacyWire condition=”cholesterol”]

[PharmacyWire search=”<search term>”]
Embeds the same search results that the PharmacyWire WordPress plugin would generate as if the use entered the specified <search term> in the plugin search engine. If the results match single results, product packages are shown. Otherwise product name links are shown instead.

Example: [PharmacyWire search=”sta”]

[PharmacyWire ifuser=”<url>”]
[PharmacyWire unlessuser=”<url>”]
Provides a simple mechanism for a non-programmer to show different pages to logged in users versus anonymous users. In the first case, if there is a user logged in, the page will redirect to the given <url>, while anonymous users will be shown the content on the page. In the second case, logged in users will be shown the content on the page, while anonymous users will be redirected to the given <url>.

Example: [PharmacyWire ifuser=”/refill-order/”]

[PharmacyWire storeinfo=”<keyword>”]
Display one of the store parameters configured with the PharmacyWire plugin. This short code is used to ensure consistent use of the store name, address, phone and other contact information throughout the site. Allowed keywords are as follows:

  • name – store name
  • pharmacy – name of the pharmacy of record
  • license – pharmacy license number for the pharmacy of record
  • address – mailing address of the store
  • city – city of the store
  • province – province of the store (may also use ‘state’ for this keyword)
  • country – country where the store is located
  • postalcode – postal code of the store mailing address
  • phone_area – area code of the primary contact phone number
  • phone – primary contact phone number
  • fax_area – area code of the primary contact fax number
  • fax – primary contact fax number
  • email – email address to use to contact customer service

Example: [PharmacyWire storeinfo=”name”]

[PharmacyWire userinfo=”<keyword>”]
Display one of the values associated with the currently logged in user. This can be used to customize a given page for logged in users, and should be combined with the [PharmacyWire unlessuser=”<url>”] tag to ensure that anonymous users are not presented with text that has gaps because the user information is not present. Allowed keywords are as follows:

  • username – username of the logged in user
  • name – user’s full name
  • firstname – user’s first name(s)
  • lastname – user’s last name
  • address1 – first address field
  • address2 – second address field
  • address3 – third address field
  • city – city the user;s primary billing address
  • province – province of the user’s billing address (may also use ‘state’ for this keyword)
  • country – country for the user
  • postalcode – postal code of the user billing address
  • phone_area – area code of the primary contact phone number
  • phone – primary contact phone number
  • email – email address to use to contact customer service

Example: [PharmacyWire userinfo=”name”]

[PharmacyWire login=”<true>”]
Provide a page to show the standard login form for a user. Note that the login form is automatically part of the checkout process, so this page is not strictly necessary, but many sites prefer to have this available for users to login to check their profile, and see their order status.

Example: [PharmacyWire login=”true”]

[PharmacyWire logout=”<true>”]
Once the user wants to end their session, they will typically look for a logout page. By providing a link to a page that contains this shortcode, you will be able to provide a mechanism for them to abandon their session.

Example: [PharmacyWire logout=”true”]