Search

Hi

I was wondering if someone could point me in the right direction on the following issue I'm having.

I've got a large database of products that have offers linked to them. The offers can then be changed and the site updates the pricing etc. The offers have a reference link to select which products they apply to.

I have a datasource to pull all the offers which then outputs this 'products 'parameter' - this is then fed into a products datasource to retrieve the products so they can be displayed.

I want to display all offers on a page with a selection of 10 random products that the offer applies to however using my previous model I'm hitting memory limits due as most of the products in the database have offers.

I was wondering if anyone had any pointers on the best way about making a custom datasource to solve the previous problem.

Thanks David

As far as I know, custom datasource :) There is no built in way to tell a Datasource to extract only X products per offer.

Yeah thanks for that, I was just wondering if someone could point me in the right direction in terms of doing it :)

I guess you simplest way would be to query the offers and then construct an SQL statement in order to retrieve the top 10 for each and loop through. I'll take a look at the API anyway.

symql might be a good place to start.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details