Most Popular

1500 questions
4
votes
1 answer

Filtering on related entries (with an array query param)

I'm getting myself into a potential pickle here and wanting to know the best way to get apply filters on the current scenario: I have a central business section which is getting populated via an API (just a little background info) and I have a…
Darren Wood
  • 117
  • 6
4
votes
1 answer

Commerce: How can I dynamically create a discount for any given product?

I am inspecting my cart when the user visits /commerce/cart and if the cart contains a specific product, I want to alert the user that they can redeem a credit for "x" item. If the users chooses to use the credit, I would like to assign the…
Damon
  • 4,706
  • 1
  • 20
  • 36
4
votes
1 answer

How do I stop an element from populating?

I have an event listener on elements.onPopulateElement, what I want is make a last minute decision if I want to populate or not. I have certain customfields on an admin CP user (eg company). All entries (in this case in the section "normalUsers",…
pythic
  • 569
  • 2
  • 9
4
votes
2 answers

Multi-Environment S3 Asset Paths

If I have three environments; local, dev, and live, and want assets to be setup like this: local: stored in a local directory (/public/uploads) dev: stored on S3 dev bucket live: stored on S3 live bucket What's the best way to set this in a…
Ian Young
  • 584
  • 3
  • 9
4
votes
1 answer

Smart Map cluster marker

I use Smart Map for a project, but I have a question for this plugin. Is it possible group the markers per cluster or I need see other options. Tks
4
votes
2 answers

How can I display a message after login?

When a user logs in, I want to display the message "Login Success" or an error message "Username or Password is incorrect" if a user enters the wrong details. What is the best method for displaying these messages when a user logs in and logs out? I…
William Spark
  • 381
  • 3
  • 9
4
votes
1 answer

How do I filter by multiple Smart Map addresses?

I have profiles (Users) that can have multiple addresses (currently two Smart Map fields called profileAddress1 and profileAddress2). I know how to filter by a single address: {% set results = craft.users({ group: 'profiles', …
medoingthings
  • 949
  • 9
  • 16
4
votes
0 answers

Craft SMTP emails + Localhost [Mamp pro] (+postmarkapp)

Ok I'm running Mamp pro 3.0.5 for my localhost setup and php 5.3.28 and for the life of me, I can't get my localhost setup to send out emails. My host name is smtp.postmarkapp.com My username and password are my API key as specified by postmarkapp.…
Adam McCombs
  • 1,695
  • 12
  • 25
4
votes
1 answer

Getting all entries from all locales

Can anyone confirm if I want to pull back a list of all entries regardless of locale I could do something like craft.entries.locale(null) to get 100% of entries?
joep
  • 610
  • 4
  • 12
4
votes
1 answer

How to control the format of an asset's Title

Is there any way to control the formatting of an asset's title that is created from the filename on upload? At the moment, if you uploaded a file called Craft-CMS.pdf it would create the title as Craft Cms - where in most cases I you would expect…
michaelroper
  • 303
  • 2
  • 5
4
votes
1 answer

Order Confirmation Email in Craft Commerce

I am having trouble with emails being sent by Commerce. Checked my settings in Craft and sent test email. Works. Followed Commerce docs in setting up email. Double checked, but still does not work. My problem may be in my email file. Not sure…
user1663102
  • 177
  • 1
  • 9
4
votes
2 answers

Is there a way to detect if a action is triggered from a control panel form?

We're building a content platform for a bank for a client of us. One required feature lets relationship managers add clients (members) to the platform which get assigned a specific group. We listen to the users.onSaveUser event and when the specific…
luwes
  • 145
  • 7
4
votes
3 answers

Would it be possible to create a plugin to warn a user if a page is being edited

In a previous CMS we used (Processwire), one of the authors created a very useful plugin that would warn a user on an edit page that the page was currently being edited by another user. I'm thinking this would be a useful addition, unless Craft's…
4
votes
2 answers

Is it a security risk to put Craft templates inside public root?

Due to the way our build and deployment process works, it's convenient for us to have the Craft templates inside our /public/assets folder together with our css and javascript, instead of in /craft. Does this make the site less secure than having…
André Elvan
  • 7,288
  • 22
  • 34
4
votes
1 answer

Product Categories, Structures and Channels

We are currently updating a brochure website, separating a single list of products into a series of sub-categories. Currently, we have a "single" section to display all products, and then a "channel" which has two entry types (products &…