Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-25-2018 20:06:39

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 935

Admin Product Related Categories

Hi,

I have an interesting task.
My client would like when a product is in more than one category, to have a different sort order.
E.g., A product may be first in one category and last in another category.

In the product configuration, I would like to change the selection of categories from a radio button to a textbox where an integer can be entered.

Then, that integer will be used in the program to sort the products in that category.

Can you point me where to do this?
1. Change the input from radios to a text box accepting an integer.
And, store it in ecom_prod > xcat field as
         catID1:sort#1,catID2:sort#2
or
         books:4,glasses:10

2. Then, where would I update the software to use that value to sort when that category is the current page?

Thank you! You're swell smile

Offline

 

#2 01-26-2018 08:25:19

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19512
Website

Re: Admin Product Related Categories

K9 supports this by allowing you the choice (via select field) to sort related categories based on sort order, or by the order entered in the related categories field.  In your case the order entered would be the way to go.  Unfortunately there's nothing in V8 that does this, however you could reprogram the ECOM_Cat class to use the ordered entered (by re-sorting category lists by ordered entered) to replicate this functionality and achieve your goal.


Nick Hendler

Offline

 

#3 01-26-2018 11:27:44

Blitzen
Member
From: USA
Registered: 01-01-2005
Posts: 935

Re: Admin Product Related Categories

Thank you, however, it's the sort order of the PRODUCTS that he wants changed - not category sort order.
E.g., A PRODUCT may be 1st listed in one category and last in another category.

Where are the radio buttons _created for display & _analyzed (after submission)?
This would be TEXTAREA-RELATEJS display type.

Offline

 

#4 01-29-2018 08:37:56

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19512
Website

Re: Admin Product Related Categories

Understood.  ECOM_Cat::catshow() pulls in the category and any products listed.  Those are passed to ECOM_Prod::prodlist() where the sort order is used.  You'd want to manipulate ECOM_Prod::prodlist() to adjust the sort order based on new sort order fields (I suppose) and an indicator on the category level to flag which sort order field gets used.


Nick Hendler

Offline

 

Board footer