Author Topic: Product Page Fields For Templating  (Read 126699 times)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Product Page Fields For Templating
« Reply #15 on: February 07, 2012, 21:03:06 pm »
this should work

<?php echo $this->product->product_sku ?>

YOU are probably adding it in teh wrong place
I do NOT do development work for hire.

kohno97

  • Beginner
  • *
  • Posts: 2
Re: Product Page Fields For Templating
« Reply #16 on: February 09, 2012, 12:41:39 pm »
An additional field (regarding product's measurement) is
$this->product->product_lwh_uoc that returns the measurement unit.

Now a question: how can I use these values (as well as with product_weight_uoc) so I can get a localised string? The backend provides such localisation strings...

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #17 on: February 16, 2012, 19:28:39 pm »
I'm trying to insert the product availability date on our product details view. I can insert <?php echo $this->product->product_available_date ?> and the date shows up but its in UNIX format, and it shows up on products that have a blank product availability date.

What I would like to do is have product availability dates show up only on products that I set a date on and have the date in the correct format MM/DD/YYYY. Any help would be awesome.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Product Page Fields For Templating
« Reply #18 on: February 16, 2012, 19:44:18 pm »
I'm trying to insert the product availability date on our product details view. I can insert <?php echo $this->product->product_available_date ?> and the date shows up but its in UNIX format, and it shows up on products that have a blank product availability date.

What I would like to do is have product availability dates show up only on products that I set a date on and have the date in the correct format MM/DD/YYYY. Any help would be awesome.

The shop date format is in the language file

com_virtuemart.ini I believe
I do NOT do development work for hire.

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #19 on: February 16, 2012, 20:40:24 pm »
Any idea how to make it only show up on the products that I put in a date, and not all of them like the previous version did?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Product Page Fields For Templating
« Reply #20 on: February 17, 2012, 13:22:04 pm »
Any idea how to make it only show up on the products that I put in a date, and not all of them like the previous version did?

Product Availability AS TEXT
<?php echo $this->product->product_availability; ?>





You can just use product availability easily.

11/20/2012



I do NOT do development work for hire.

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #21 on: February 17, 2012, 22:21:25 pm »
Yeah when you use <?php echo $this->product->product_availability; ?> it will spit out a 0000-00-00 00:00:00 on products that don't have an assigned availability date. How I can make it say like currently available instead of that? see attached.

[attachment cleanup by admin]

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #22 on: February 17, 2012, 22:38:59 pm »
Alright I figured a work around, I can use the product availabilty text code. And it that either type in stock or the date its available. Downside to this is once that date passes I need to go back and change it to in stock. VERY TIME CONSUMING. Previous version of VM would just change it automatically from the date to instock once the date passed. I'd be willing to pay someone to fix that because we have 1000 products

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Product Page Fields For Templating
« Reply #23 on: February 18, 2012, 00:29:15 am »

  <?php if (!empty($this->product->product_availability)) {
echo $this->product->product_availability;
    }?>
I do NOT do development work for hire.

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #24 on: February 18, 2012, 00:44:17 am »
wouldn't it be:
<?php if (!empty($this->product->product_availability_date)) {
echo $this->product->product_availability;
    }?>

that way it shows the date, and if there isn't a date it shows the availablity which says "in stock"

But then I still have the problem of the format of the date... I can't figure out anywhere to show MM/DD/YYYY for availability date.

channelvision

  • Beginner
  • *
  • Posts: 7
Re: Product Page Fields For Templating
« Reply #25 on: February 18, 2012, 00:52:01 am »
Didn't work :(

hermtek

  • Beginner
  • *
  • Posts: 1
Re: Product Page Fields For Templating
« Reply #26 on: February 21, 2012, 01:33:55 am »
Hello everyone,
this is my first post here, usually I use the italian forum.
I want to insert the field "manufacturer name", is it possible?
Can anyone help me?

ahaaaa

  • Beginner
  • *
  • Posts: 14
Re: Product Page Fields For Templating
« Reply #27 on: March 23, 2012, 00:36:19 am »
Hi,

try adding:-

<div class="manufacturer"><?php echo $this->product->mf_name ?></div>


RuBAN

  • Beginner
  • *
  • Posts: 18
Re: Product Page Fields For Templating
« Reply #28 on: April 14, 2012, 14:13:18 pm »
Can I translate units (GR, M, etc.) to another language without PHP fixes?

TimHoogland

  • Beginner
  • *
  • Posts: 4
Re: Product Page Fields For Templating
« Reply #29 on: June 05, 2012, 22:48:38 pm »
Hello,

<?php echo $this->product->product_width ?>
<?php echo $this->product->product_height ?>

I succeed in adding this two rows in an override file, but now the numbers are presented like:

Hoogte :60.0000 cm.
Potmaat :17.0000 cm.

How can I present integers instead of the above format?

Like to hear from you,

Tim Hoogland