@iwNZ See if you can get your answer from this page in the documentation: https://www.oncord.com/developer/api/controls/forms/dialogbox/

Posts made by StephenBlignault
-
RE: Pop up - "sign up to our newsletter and receive x% discount"
-
RE: Related products - "You may also like.."
@iwNZ Hi there.
I have implemented at least 2 very popular methods in the past.
Option 1: (Moderate) Show all products from the current category
Option 2: (Advanced) Custom Field called Related ProductsOption 1:
On product detail template:<logic:variable as="arrCategoryIds" value="[? \Components\Commerce\Products\Categories::getAllIdsForProduct($product['product_id']) ?]" /> <logic:variable as="category" value="[? \Components\Commerce\Products\Categories::get($arrCategoryIds[0]) ?]" /> <div class="categoryRow"> <h2>Category Products <small>([? $category['product_category_title'] ?])</small></h2> <div class="shop-grid"> <logic:variable as="currentProduct" value="[? $product ?]" /> <data:repeater id="grid-product" class="grid-product-wrap" as="product" datasource="\Components\Commerce\Products::getAllForCategoryAndBrandRecursive($category['product_category_id'], null)" paging="true" pagingrows="20" pagingautorender="true" > <data:template component="\Components\Commerce\Products" type="list" /> </data:repeater> <logic:variable as="product" value="[? $currentProduct ?]" /> </div> </div>
Option 2:
This option is a lot more complicated:- step 1 you need to create a custom field called Related Product Ids. Use a Custom UI type, and choose Text < 255 Characters.
- step 2 then on each product you select your related products
- step 3 add a data:repeater on the product detail page to list through the related product ids, a lot like what I showed in option 1.
Your Custom UI code should look like this, or similar:
<forms:row label="Related Products"> <logic:variable as="selected_product_ids" value="[? [] ?]" /> <logic:if test="$product['product_related_products']"> <logic:variable as="selected_product_ids" value="[? unserialize( $product['product_related_products'] ) ?]" /> </logic:if> <forms:selectlist id="product_related_products" datacolumn="product_related_products" value="" as="relatedProduct" width="300" height="120" style="font-size: 80%;"> <forms:option value=""></forms:option> <data:repeater as="relatedProduct" datasource="\Components\Commerce\Products::getAllConsole()"> <logic:if test="in_array($relatedProduct['product_id'], $selected_product_ids, false)"> <forms:option value="[? $relatedProduct['product_id'] ?]" title="[? $relatedProduct['product_title'] ?]" selected="selected" /> </logic:if> <logic:else> <forms:option value="[? $relatedProduct['product_id'] ?]" title="[? $relatedProduct['product_title'] ?]" /> </logic:else> </data:repeater> </forms:selectlist> <p style="margin-top: 8px;"><em><small>Hold CMD or Ctrl to select multiple products</small></em></p> </forms:row>
Hope this sets you on the right path.
-
Animations and options inside Oncords editor
Add transitions and hover effect on <templates:row /> and/or <templates:section /> etc
Animations
Trigger - (Entrance, Scroll)
Animation - (None, Fade In, Slide In, Bounce In, Rotate In, Roll In, Zoom In etc)
If Entrance:
Direction - (In Place, From right, From left, From bottom, From top)
Duration - (50 - 50000ms)
Delay - (0 - 50000ms)Hover effect for desktop:
None, Zoom out, Opacity, Float, Forward, Grayscale, Reverse Grayscale, Blur, Blur and Grayscale
This would help keep content pages feel modern.
-
Contextual links to help and/or tutorials throughout the admin
Hi team,
I think it would be super helpful to provide a shortcut link within the admin that references help and tutorial articles about the page the user is on.
For example, if you've clicked on Redirectors show a link to https://www.oncord.com/resources/learning/tutorials/website/creating-page-redirectors/
etc
-
RE: How to bulk add posts?
Hi dhondup,
There are several methods that could be used to bulk import posts, but it is a lot more trickier than the examples given in the bulk update scripts tutorial. But it can be done.
Things to consider:
- Are all your imported posts going into the same post category, or different categories, or multiple categories?
- Will your posts link to pages, or products, or contacts or neither: link to no other resource - and live independently as just posts?
- Do you want to import your posts from a CSV file?
- If your imported posts are to additionally generate / create a Page, then you will need to have administrators login access when running the script (most likely this will be the case)
As you can see there is lots of consider.
But generally speaking, you should be able to generate a post using
\Components\Website\Posts::save($arrEntity)
https://www.oncord.com/developer/api/components/website/posts/If you would like further help with this, the team at Fuel can help writing an import script to suit your specific needs, especially if your posts need to link to web pages too. You can find our contact details in the link in my profile bio.
Thanks
-
Product Analytics
Hi team,
Can we get a shortcut link on the product edit page in the admin that can show the Analytics of a product page?
Maybe this can be under the SEO tab, or a tab on it's own.
Also a link on the Contextual Menu when viewing products in a list.We have had a few requests for this feature lately.
Many thanks
-
RE: Discounts: buy 1 get the second 1 half price
I have just had another request for a discount setup scenario.
"Buy X number of products from a category, and get Y free"
The request was: Buy 8 products from this category and get the cheapest of the 8 products free (100% discounted).
I think the setup can be broken down into 3 steps
- Items: X number of items in the the cart
- Conditions: Brand / Category / Specific Products
- Discount: Flat Rate / Percentage / Free Product / Discount off selected product
This helps incentivise adding more items to the cart, adding more value to each sale transaction, giving customers better value, and ability to reduce stock.
-
Discounts: buy 1 get the second 1 half price
We have had several clients ask us about how to set up a discount for 'buy 1 get the second 1 half price'. Currently it is workable with a few conditions and math, but it's not ideal ideal.
Perhaps the feature could operate mathematically like this:
'Buy X get the Y number of products at Z discount'.Thanks
-
Reconcile Design CSS, JS into server.php equivalents
Hi Support,
When running website audits such as PageSpeed Insights or similar, sometimes a recurring theme is "HTML text ratio", "JS / CSS not Minified" or similar. This often occurs on website builds where we have lots of CSS and/or Javascript in the Design template.
I think with individual pages, the status quo should / could remain without significant impact on the reports.
But on main Design it would great to at least have an option to reconcile / collate all design CSS and JS into either a separate type of server.php resource file, or tack it along with current server.php resources.For context, here are some descriptions highlighting the issues:
Issue description This section shows website pages whose text-to-HTML ratio is below 10%. This means that such pages are overloaded with code that may slow down its load time and complicate content processing. Issue description HTTP response compression is not configured on your website. Compressing CSS files significantly reduces their size as well as the overall size of your web page, improving the page load time as a result. Uncompressed CSS files make your web page load slower, which has a negative impact on the user experience and search engine rankings. Issue description Minification is the process of removing unnecessary lines, white space and comments from the source code. Minifying JavaScript files makes their size smaller, and as a result, decreases the page load time, providing a better user experience and improving your search engine rankings. Issue description Minification is the process of removing unnecessary lines, white space and comments from the source code. Minifying CSS files makes their size smaller, and as a result, decreases the page load time, providing a better user experience and improving your search engine rankings.
Thanks
-
RE: Introducing our new community forum
@alex_cumberland Hey Alex,
My name is Stephen Blignault and I am a web developer at Fueldesign where we specialise in ecommerce and custom web app development on the Oncord platform. I have been developing in Oncord since early 2018.
What excites me the most about Oncord is the ability to fully customise every end-point and develop just about anything for our clients, without the headache of being full-stack developers and having to employ system admins to achieve the same result on other platforms.
But the best part of Oncord is the world class support we get from the team when we get stuck with anything. It is a privilege that we honour and respect. And I look forward to paying some of this support back by helping out in the forums too.
Thanks Alex
-
RE: Under construction settings/code
@Ben Hi Ben, we have achieved this same functionality using the following method.
Step 1) Create a new temporary Design
Create a design and called it Coming Soon or something similar, and attached this design to your single coming soon / under construction page. (On your page, click on Settings icon and then choose your coming soon template under the Design field.Step 2) Lock down your current Design (using PHP method)
Then your current website design, the default Design template for the rest of your website, click the Source icon and then the PHP tab and add the following code:<?php // disable the website until we are ready to launch website. // only homepage 'coming soon' page is available for non admins. if (!\Components\Settings\Administrators::currentIsAdministrator()) { \Framework\HTTP\Redirection::redirect('/'); } ?>
This will redirect all non-logged in Administrators to the homepage, which should be your Under Construction page.
Note, if your Under Construction / Coming soon page is is not the homepage, '/', then replace the code from '/' to your page name, such as '/coming-soon/' or similar.
Hope this helps
-
Bulk add Products to a Category
When adding a new category for an established website that has many products, it can become tedious to individually add products to the new category. Ideally there would be a feature that allows administrators to bulk select and add products to a newly created category.