All Questions

2
votes
1answer
38 views

Order products by lowest product variant

Currently using Craft Commerce 2. I was wondering if it's possible to order products by the lowest priced variant. I have tried something along the lines of this, but it doesn't do anything ...
2
votes
2answers
49 views

How to include twig in the editor? e.g. Shortcodes for dynamic content

I would like to display dynamic content in the middle of a text block. For example, a list of entries pulled in from the backend, in the middle of content. In Wordpress we can use Shortcodes. Does ...
2
votes
1answer
30 views

Empty matrix object after checking for a block type

Not sure if this is a bug or my logic is off. I'm trying to add caching logic to templates to not cache certain pages if they have a block type form present because of the dynamic CSRF tokens. The ...
2
votes
1answer
16 views

Craft 3 Plugin not returning custom field value

I am trying to get the value of a custom field in entries, but I can't seem to get it to grab that value. I'm assuming I'm pulling it too early or too late, otherwise I have no idea. I can pull the ...
2
votes
1answer
37 views

Updating matrix field from font-end with $entry->setFieldValue() pulls in Cp bundle on save

I have an entry with a matrix field which I'm updating from front-end. The update works fine, but when the (font-end) page reloads after submitting the form, the CP bundle assets get included (...
1
vote
2answers
16 views

Dropdown field value getting outputted multiple times

I have a dropdown field that has three options. In my template, I want to do one thing if option 1 is selected and do something else if option 2 is selected. Here is what my code looks like: {% for ...
0
votes
2answers
20 views

Hyperlinks in blog are not showing underlined

I'm brand new to Craft, having been a Wordpress user. I'm managing a site for a small charity. Having done some new pages and a blog page without any problem, I did a blog yesterday in which the ...
3
votes
2answers
31 views

Showing a list of selected/related categories to entry

I have a suitability category field in my product type that allows the content writer to select which categories this product is associated with. But my issue is that on the product page I need to ...
2
votes
1answer
14 views

Method for creating Category Group landing pages

I have a selection of category groups as follows: Suitability Colour Finish etc They all have many categories within them. I have set up some routes for /suitability etc to show the user a /shop/...
2
votes
1answer
40 views

Disable dateUpdated

I am using Craft 3 to populate content over a REST api. Now I have a use case, where I want to update an internal field of an entry without changing the dateUpdated. Otherwise the clients would get ...
2
votes
1answer
44 views

Exposing current Commerce2 Cart via the Element API

I want to be able to retrieve the current users Cart via a JSON API endpoint, so I can loop through the products in the cart in JS on the front end. I've got the Element API plugin installed, but I ...
1
vote
1answer
25 views

Modify Order table in Control Panel

I need to add and/or change an attribute in the order table on /admin/commerce/orders. The Order Element itself does not have a EVENT_SET_TABLE_ATTRIBUTE_HTML, and I've tried with variations like ...
0
votes
1answer
18 views

Replace quotes in an array

I'm trying to use a charting library within a Craft template. The chart expects an array of numbers that I'm building up from a table but I'm getting an array of strings instead. {% set donutData = [...
1
vote
1answer
47 views

Craft CMS Structure: How can I display parent and child items on an active parent page?

I'm currently setting up a Structure nav and am trying to set it up so that child pages only display if; 1) The child page itself (or it's sibling) is currently active 2) The parent page of that ...
0
votes
1answer
17 views

After migrating, I am getting this error for several of my buttons and menus on Craft 2.6

Internal Server Error Craft\MatrixBlockModel and its behaviors do not have a method or closure named "header". Apache Version 2.4.37 PHP Version 7.1.24 MySQL Version 5.7.24 Architecture x86_64 ...
2
votes
1answer
25 views

Sprout reports timing out on thousands of records

I have sprout reports (twig template) exporting tens of thousands of records. Problem is that its timing out. I appreciate that this is expected and my only likely option is to up the server spec. Is ...
1
vote
2answers
44 views

Craft 3: Preventing Element from Saving in Plugin

I had a simple Password Confirmation validation function in Craft 2. In porting the function to Craft 3, I'm struggling to figure out how to handle the same thing. In Craft 2, all events were ...
1
vote
1answer
37 views

How can I display second level children only from a specific parent structure item?

I'm trying to display a list of child structure links, but only from a specific parent. The template I'm working on isn't for the parent in question so I don't think I can use 'entry.' My structure ...
1
vote
1answer
28 views

Using multiple 'search' parameter values to filter entries

I'm trying to filter entries down based on keywords and also if they have selected a letter that matches the first letter of an entry title on Craft 3. So far I have this: {% set keywordParam = ...
3
votes
1answer
46 views

Dynamic Image Variant in Template

I'm keen to set my image variants dynamically from content editor and not quite sure how I do this in twig. I have three variants. They are named imageVariantsThumb, imageVariants16by9, and ...
0
votes
2answers
33 views

Implement Cloudways CDN with Craft

Is there any way or plugin to implement Cloudways CDN with Craft?
-1
votes
1answer
20 views

Craft 2, child dropdown, database

I am running Craft 2 CMS for one website. Its in Norwegian for our client. Its about SKI School. Where Parents reserves sport dates for there children. In database there are parents profile with ...
1
vote
1answer
18 views

Setting plugin subnav to active

I have written a plugin that works fine, it has a subnav which i build like so: public function getCpNavItem() { $item = parent::getCpNavItem(); $item['subnav'] = [ 'moderateentries' =...
1
vote
2answers
32 views

Updating Array Variable In Extending Template

I have a layout template: {% set bodyClass = [] %} <body class="{% for class in bodyClass %}{{ class }} {% endfor %}"> {{ block('pageBody') }} </body> And a template that extends it:...
0
votes
1answer
147 views

Need somebody to help us with our existing Craft web page [duplicate]

Our developer has disappeared and we need some help in changing and adding a few things on our website (www.fincarosablanca.com)? Would like to have somebody in Costa Rica but it doesn't really matter....
2
votes
2answers
45 views

How to render plugin templates in Craft CMS 3?

I cannot find a way to render templates from a plugin controller in Craft 3. I feel as though I've tried every variation advised online but for some reason this still isn't working. <?php ...
0
votes
1answer
28 views

Partial links not going outbound

I have links on a partial within my templates, but it seems to be trying to load a template when it should just be loading the outbound href of the <a> tag. I don't have a clue why this would be ...
1
vote
1answer
46 views

Bypass CP login

I've got a very special case in a big offline installation . For strange technical and administrative reasons, I must have 5 different Craft instances each one in it's own server (on the local network)...
1
vote
1answer
18 views

Erros when using Entry Variable in craft.app.feeds.getFeedItems

I'm processing some feeds using craft.app.feeds.getFeedItems() and it works if I pass the limit as a hard coded number like this: {% set items = craft.app.feeds.getFeedItems(entry.rssURL, '5') %} <...
0
votes
1answer
23 views

Overwriting specific method in plugin

I want to expand functionality of perform plugin with generating pdf from message submission data and attaching it to email this plugin sends. I can't use events for this, because this plugin doesnt ...
2
votes
0answers
16 views

Asset Upload Form Field Error States

I currently have an asset upload field, but I'm trying to make it call errors back if the image isn't an extension that's set within the field, allowing users to understand why the form didn't save. ...
1
vote
1answer
26 views

Moving site to subdomain

I am moving our current site to a subdomain and get this: "Craft CMS requires the PHP multibyte string extension in order to run." I have updated the $craftPath variable and System->General->...
0
votes
1answer
22 views

Next in structure if lightswitch field off?

I'm trying to get the next field in an entry if a passwordRequired Lightswitch Field is switched off. How would I go about that?
1
vote
1answer
12 views

AuthorizeNet CIM gateway in Commerce 1

Is there any barrier to using AuthorizeNet CIM gateway in Commerce 1? The vendor/omnipay/authorizenet folder has a CIMGateway class but there doesn't appear to be a corresponding ...
1
vote
1answer
24 views

Accessing Commerce product variant dimensions in the template

I have been unable to locate anything in the docs or any questions on here regarding how to print the dimensions associated with a variant in the template. All I have managed to find is how to print ...
1
vote
1answer
33 views

Good way to handle multisite fallback templates

So I've got a multisite going on. For most of the sites, most of the time, they'll be using the same templates. But I want a good way to handle siteX needing one template to be different from the ...
1
vote
1answer
28 views

Craft 3 Registration Form Success Redirect

Is it possible to redirect the user to a specific page after they successfully complete the front-end registration form (before activation)? I've tried adding: <input type="hidden" name="action" ...
1
vote
1answer
24 views

Connect to an external database from a Craft 2.x plugin

I recently saw a very helpful post about how to connect to an external database from a Craft plugin and I wanted to confirm I understood the implementation correctly. On this response the author ...
1
vote
0answers
21 views

Combining multiple categories based on URL segments

I have two category groups - brands and resources. Under these I have product videos and documentation entries - section ‘resources’. I’m using the brands categories elsewhere for products too so I’ve ...
1
vote
2answers
40 views

How to upload a template in Craft CMS 3 on an Ubuntu web server

Really new to this platform and could use some help with how to upload a theme/template which I downloaded from ThemeForest. The files are compatible with HTML 5 and Craft 3 is on an Ubuntu server.
1
vote
1answer
17 views

Plugin CKEditor outputs something with nothing?

I have a problem with the CkEditor for Craft CMS. If I leave the textfield empty and save it, the output in the browser will still contain <p>&nbsp;</p> when I want it to be blank. I ...
2
votes
1answer
49 views

Call function from plugin in template

In craft 2 I had a simple plugin that I used to run some php code. I could call the function like this. {{ craft.pluginname.functionname }} However I have been unable to do the same thing in craft 3....
1
vote
2answers
26 views

Possible to paginate product variants in Craft Commerce 2?

I am currently in the process of building a commerce 2 site with a very detailed level of nesting in the product options so we're looking to list all variants for a product. (Sounds silly, but it ...
1
vote
2answers
41 views

How do I create a structure side navigation that will show active parent list-item and active child list-item

A bit of a background on the project. I have a features structure section, that has 2 levels: Parent features & Child features. {% set features = craft.entries.section('features').all() %} My ...
1
vote
1answer
16 views

How do I get different URL Format with parent/child structures & how do I display different templates?

I need to create a features structure section for a website that will have parent features and child features. Q1: How do I get different URL Format for parent & child pages? I need the parent ...
2
votes
1answer
11 views

Including a variant segment in product type template route in Commerce 2

Is it possible to use a wildcard when specifying the template path for a Commerce 2 product type? I want to format my URLs as /type/product/variant Where 'variant' could be a custom field applied to ...
1
vote
0answers
29 views

Adjustables - Tax and VAT

I'm working on a custom payment gateway, and the concept of tax adjustments are giving me some headache. How is this adjustment system, especially regarding tax, supposed to be used? Would it be ...
1
vote
1answer
44 views

How to browse uploaded assets on the front end?

I have a frontend entry form which included a file field to upload files to the entry. All works fine. I even have a delete function to remove individual uploaded files from the entry. The problem ...
1
vote
1answer
42 views

Ran the Craft Updater from Control Panel the current install is no longer working

The previous install (3.0.34) was working fine until I ran the updater from the CP. The update failed with error (couldn't access web.config (IIS)) Now loading CP or front end displays the following ...
1
vote
1answer
25 views

Migrate sprout forms

Is there any way to migrate the configuration of a Sprout Form between my local environment and the production environment? I'm on Craft 3. Ideally, I'd love to generate a migration using the ...

15 30 50 per page