Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Tags ID are incremented each time a product is modified

Featured Replies

Hello,

Each time a product is edited and saved, Tags ID are changing.

It make non sense to me as i need to add a field/property ('category') to the Tag Object

When my field is added and his value is modified for example : Tag->name = 'economy' Tag->category = 'Article'

When i edit my product Tag->category is lost. When go to catalog>Tags econmy'id value is no more '1' but Two.

I see in adminProductController that Tags are deleted then reassign.

So all previous modification to Object tag are lost and the ID has been incremented. The Method addTags never recognize isobectloaded.

Is it normal ? why ?

People usually write code which fits their needs. They have no magic crystal ball to find out which other uses one could come up with in the future. The code in question was written in 7/2015 (reformatted later).

Now it's 2017 and you found such an additional use, so this code apparently needs a review. If you can come up with better code, not breaking previous usage, I'm pretty sure it can be accepted for thirty bees 1.1.0.

  • Author

At first, thanks for your reply,

I've found another solution and now i use features.

For Tags I've found another logic to develop the solution When deleteTags is called create as, $tagremoved and a $tagcategory_removed push in an array as param to addTags() which call the constructor with an array as param for $name then call __construct::ObjectModel

This is what i imagined to keep all the maximum native code. but iswitch for features

But i don't understand the logic to deleted and recreated. the reason why. I see in adminProductController, that i would have to force the association of tag to product in product_tag BEFORE but something get me wrong.

But i don’t understand the logic to deleted and recreated. the reason why.

It's the simplest way to do an update. Such updates happen rarely, so there's no need for performance optimization.

For Tags I’ve found another logic to develop the solution

Code, please! :relaxed: Ideally as a pull request, but patches uploaded here are also welcome.

  • 8 years later...

Hello all,

when digging deeper into tags, I came across this post. I show all tags on my product pages. To make it easy for customers, I manually managed tags to have ID's in some ranges and they are then displayed according to the tag IDs in ascending orders. So the would ideally appear in an order like this one:

BRAND (Range 0 to 30000)
Year-of-Production (Range 30001 to 39999)
Age (Range 40000 to 49999)

But I see that some products get some kind of random new tag IDs. It looks to me that only products are affected from this behavior when the tag is only 1x assigned.
The result of this is randomly changing order of tags.

Edited by Scully

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.