VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Peter Möller on November 21, 2021, 19:13:16 PM

Title: [solved] Why isbn field, if you don't show it?
Post by: Peter Möller on November 21, 2021, 19:13:16 PM
Virtuemart V3.8.8

I'm on the way for my first webshop with virtuemart, its a bookshop. It comes in handy, that there is a isbn field already, but it is not shown in the frontend, even if filled.

As solution for older versions i found here: template override.

I can do so, but I wonder why a standard field is not shown in the frontend.

Any ideas?

Thx in advance for ideas and tipps :-)
Title: Re: Why isbn field, if you don't show it?
Post by: pinochico on November 21, 2021, 20:12:32 PM
Quotestandard field

Why standard?

Maybe standard only for bookshops, isn't it?
Title: Re: Why isbn field, if you don't show it?
Post by: Peter Möller on November 21, 2021, 22:02:45 PM
Maybe I asked in the wrong way, sorry ;-)

If the standard virtuemart offers gtin as standard field, I would expect, that in the standard layout resp. sublayout files there is some code like:

if (!empty($this->product->product_gtin)) { ...

Why not add it as standard code? Or was it just forgotten?

Title: Re: Why isbn field, if you don't show it?
Post by: GJC Web Design on November 21, 2021, 22:05:38 PM
You simply add it to your display template .. why would it always be shown when a book store would only be a minority of web shops?

<?php 
          // Product isbn
          if (!empty($this->product->product_gtin)) {
          ?>
          <div class="product-gtin">
          <?php
          echo $this->product->product_gtin;
          ?>
          </div>
          <?php
          }
?>

gtin/ean etc are normally just used for product feeds to google etc
Title: Re: Why isbn field, if you don't show it?
Post by: Peter Möller on November 21, 2021, 22:23:26 PM
@GJC Web Design: Thx for Your answer :-)

I thought again, why I ask this question. If this 'conditional'  code would be added to the standard template, then users must not be programmers, if they want to use it, they just add a text to the gtin field and it is displayed. For those, that wan't need it: it is not displayed anyway.

Its just a convenience for non-programmers. I myself can handle this ;-)
Title: Re: Why isbn field, if you don't show it?
Post by: pinochico on November 22, 2021, 01:16:24 AM
to Peter:

I also thought about your question:

Unfortunately, you are probably crying on the wrong grave.

It is common practice for template manufacturers not to specify ISBN fields (nor as a conditional field):
https://www.joomlart.com/joomla/templates/tag/virtuemart
https://demo.gavick.com/joomla3/stora/
next....

And it won't improve your Virtuemart template implementation requirement - you don't want to use it - and it won't be in another - you probably won't help much, will you?

But you can write everything to the manufacturers of joomla templates for VirtueMart (I have no idea how to find out all the contacts) and convince them, others will definitely appreciate it. (those tenths of a percent of users)

Personally, I wouldn't worry about that, and if it were necessary, I would put the mentioned code here in the discussion (or rather newly modified) into the template myself and I would not solve it further.
If I didn't have it, I would make it or commission it from our developers.
Title: Re: Why isbn field, if you don't show it?
Post by: GJC Web Design on November 22, 2021, 12:19:22 PM
the reason is that many shop owners use the gtin/ean field but only for their promotion feeds etc .. not for display...
Title: Re: Why isbn field, if you don't show it?
Post by: Studio 42 on November 22, 2021, 13:16:58 PM
You have other fields that are never displayed
For eg. Width,Height ...
But in what view should this be displayed?
In the category list or only in product details ?
Should the manufacturer displayed as thumb or text or link or link suing a thumb ?
Of course if you are note a coder, it's some work, but if you display all and you do not want to display it, then you have to modify the code too.
Title: Re: Why isbn field, if you don't show it?
Post by: Peter Möller on November 22, 2021, 19:10:14 PM
@pinochico, GJC Web Design, Studio 42: Thx alot for your ideas. I really didn't take into account, that my suggestion could only be part of exactly one template: Vmbeez3

Yes, lets forget about my idea, it makes no sense, though its a pity ;-)