Rank: Member
Joined: 11/11/2011(UTC) Posts: 13
|
Long story short, I just started working for a company who is using BV 5.8 for their store. The previous in-house guy appears to have broken the product display template in use for most products. Now I've been directed to "fix it." I didn't want to dig through his changes to the css or the product display template, so I opted to change the display template since we have another that works fine.
Tried a batch update on every product to change the display template, but the request is too large and keeps throwing an error.
Rather than change the display template for each product (4000+), I ran an SQL query that updated the product display template for every product in theProduct table. It has taken effect, my queries show that every product is now supposed to be using the correct template, and I can log in to edit each product and see that the dropdown box has the correct template selected.
But products are still displaying on the site with the incorrect template, and the new template will only take effect if I open each product and click Update or Save Changes. Why is this happening, and what can I do to make each product use the new template?
</div>
|
|
|
|
Rank: Member
Joined: 11/11/2011(UTC) Posts: 13
|
Also, when I try to do a product batch edit by manufacturer to set the display template, the changes take effect but the products still don't appear to be using the new template until I go into each one and Update or Save Changes.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
If you're using manually specified URLs (i.e. the "Rewrite To" field has a URL) rather than using auto-rewriting, you will also need to update the bvc_CustomUrl table. This maps the requested URL to the physical URL of the template. When you use the admin to change the template it takes care of this for you. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 11/11/2011(UTC) Posts: 13
|
Shouldn't that be taken care of if I do a bulk product update through the admin?
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Yes, it should. But, from your account of what's happening and from looking at the code, it looks like it doesn't. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 11/11/2011(UTC) Posts: 13
|
That's correct sir!
It's not a huge problem, more of an annoyance. I'm hacking together a perl script right now to update the required fields.
Just out of curiosity... Rather than create an entirely separate table with redirect info, thereby complicating the matter, wouldn't it make just as much sense to read the template field and do it on the fly? Or does that go against some rule I don't know about?
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
If the URL rewriter only worked with products I would agree with you. However, it also works with categories, custom pages, custom URLs, etc. This would require the rewriter to perform multiple table lookups rather than a single one. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 1/10/2005(UTC) Posts: 714
Thanks: 14 times Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
Rank: Member
Joined: 11/11/2011(UTC) Posts: 13
|
But... don't products and categories have their own tables with TemplateName and RewriteUrl fields? From what I can see, the extra table is the custom URL table full of information that's present elsewhere in the DB, yet not referenced. I don't see anything in dbo.bvc_CustomUrl that can't be achieved on the fly.
Then again, I'm not a C# developer. Not trying to start any trouble, but it is a little frustrating that I have to spend a few hours writing a script to do something that should have taken me the 30 seconds it took to update a relevant field in the database. Either that or spend twice as long letting the software do it for me... click, click, click click, repeat. We won't be changing templates in BV Commerce any time soon.
Thank you, I appreciate the help. You will probably be seeing more of me!
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: "bellis" But... don't products and categories have their own tables with TemplateName and RewriteUrl fields? From what I can see, the extra table is the custom URL table full of information that's present elsewhere in the DB, yet not referenced. I don't see anything in dbo.bvc_CustomUrl that can't be achieved on the fly. Yes, but you're missing the point I was trying to make in my previous post. When a request hits the web server the software must decide how to handle this. Is the request for a URL that is rewritten or does it pass through to a static file? If it is to be rewritten, what kind of page is it (product, category, custom page, etc). Without a single table to be the master for this information, the software would need to perform a lookup in each table until it found a match. You can also look at this from the other direction meaning that each time a product is returned from the database you would need to perform a join to the URL table rather than the product table containing a duplicate of that information. I get that it offends you sense of referential integrity, but from a performance standpoint it makes sense. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
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.