You are here:  » 14/06A Product Extra Fields


14/06A Product Extra Fields

Submitted by affiliben on Tue, 2014-08-12 13:23 in

Hi David
Thanks for the recent update it is excellent. I love the responsive theme and new admin features, especially the ability to re-order filters.
I usually have extra fields on my html/product.php and I am having difficulty making then look nice. When I copy and paste some of the <div class etc and change to my new fields, they just sit beneath the description on the right of the page, whereas before I could use a table etc.
I assume tables are not responsive, so can you point me in the right direction as to the best way to do it.
While I am on, I use the Shopping / Short list feature (See here), but is there a way to use a combined one for more than one installation on a site?
Thanks
Ben

Submitted by support on Tue, 2014-08-12 14:20

Hello Ben,

Thank you for your comments!

There's nothing wrong with using a table within a responsive design for showing attribute : value data as that is actually what tables are designed for. In html/product.php if you look for the following code at line 46:

  <?php endif; ?>

..and REPLACE with, for example;

  <?php endif; ?>
  <p>
    <table class='pt_custom'>
      <tr>
        <th>Custom Field 1<th>
        <td><?php print $product_main["custom_field1"]; ?></td>
      </tr>
      <tr>
        <th>Custom Field 2<th>
        <td><?php print $product_main["custom_field2"]; ?></td>
      </tr>
    </table>
  </p>

You may find that Foundation's layout is ideal without any further adjustment, but I included the class='pt_custom' in the above so that you can style the table via html/default.css - just add .pt_custom th { } and .pt_custom td { } definitions as required - let me know if you're not sure how to achieve the look you're after of course.

Regarding your Shopping List question - I'll check out a way to do that on my test server and follow up on the thread...

Hope this helps!
Cheers,
David
--
PriceTapestry.com

Submitted by affiliben on Tue, 2014-08-12 16:02

Hi David
Excellent service as usual
Many Thanks
Ben