News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product Page Fields For Templating

Started by PRO, November 03, 2011, 17:16:20 PM

Previous topic - Next topic

PRO

this should work

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

YOU are probably adding it in teh wrong place

kohno97

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

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

Quote from: channelvision 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.

The shop date format is in the language file

com_virtuemart.ini I believe

channelvision

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

Quote from: channelvision 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?

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





You can just use product availability easily.

11/20/2012




channelvision

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

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


  <?php if (!empty($this->product->product_availability)) {
echo $this->product->product_availability;
    }?>

channelvision

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.


hermtek

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

Hi,

try adding:-

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


RuBAN

Can I translate units (GR, M, etc.) to another language without PHP fixes?

TimHoogland

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