• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Steve95
#1 Posted : Tuesday, August 25, 2015 9:53:54 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 253

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
I am currently developing a new front page content block which will use some specialist (read variable size) images. As they are of a specialist nature I do not want to user either the small, medium or the additional images as these images will break other elements within the theme.

I don’t think I could use the Product.CustomProperty as these are already in use to a varying degree on the several sites this content block will be used upon.

Can anyone think of an alternative method of extending the product class to accommodate another image collection, without having to modify the Core?
Steve95
#2 Posted : Tuesday, August 25, 2015 10:47:08 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 253

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
I resolved the above by utilising the Component settings in the end as this seemed a better fit with regards to the open/closed principle.
Aaron
#3 Posted : Tuesday, August 25, 2015 1:08:09 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Steve,

Can you elaborate on why you didn't think a CustomProperty would work?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Steve95
#4 Posted : Wednesday, August 26, 2015 6:35:23 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 253

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
Aaron

One of the sites has a lot of custom properties for a few products (over a hundred) which it takes a fair amount on time to retrieve and parse the xml via its mapper in the core. This is the only time I have seen this many CustomProperties so it is probably an edge case as BV doesn’t have any issues with address for instance using the same functionality.

Edited by user Wednesday, August 26, 2015 7:49:35 AM(UTC)  | Reason: Not specified

Aaron
#5 Posted : Wednesday, August 26, 2015 8:18:27 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: Steve95 Go to Quoted Post
One of the sites has a lot of custom properties for a few products (over a hundred) which it takes a fair amount on time to retrieve and parse the xml via its mapper in the core.


Wow! Yeah, that's a little extreme and probably not an appropriate use of Custom Properties. Is the data valid? The reason I ask is that earlier versions of 5.X had a bug when cloning products that caused duplication of Custom Properties. So, if you cloned a clone you would multiply the number of properties.

Back to your question, the only real downside to using Component Settings is that it requires an extra SQL query (or more, depending how you do it or how many settings you have to retrieve) compared to Custom Properties, which you would have already loaded with the product.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Steve95
#6 Posted : Wednesday, August 26, 2015 9:15:42 AM(UTC)
Steve95

Rank: Member

Joined: 4/29/2010(UTC)
Posts: 253

Thanks: 4 times
Was thanked: 11 time(s) in 10 post(s)
It’s all valid but I believe this particular site has been on BV pre 5.0 when apparently it was "the only way" its functionality could be carried out before the introduction of product properties.

Edited by user Wednesday, August 26, 2015 9:18:24 AM(UTC)  | Reason: Not specified

Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012