Oncord Community Logo
    • Recent
    • Popular
    • Register
    • Login
    1. Home
    2. StephenBlignault
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 12
    • Best 4
    • Controversial 0
    • Groups 0

    Best posts made by StephenBlignault

    • 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

      posted in Feature Requests
      StephenBlignaultS
      StephenBlignault
    • 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 Products

      Option 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.

      posted in Oncord Discussion
      StephenBlignaultS
      StephenBlignault
    • 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

      posted in Feature Requests
      StephenBlignaultS
      StephenBlignault
    • 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.

      posted in Feature Requests
      StephenBlignaultS
      StephenBlignault