Enhancing Product Details Display for Radios E-Commerce Platform
-
Good morning,
We have chosen Radios to build our e-commerce platform.
In our database, there is a field that contains the HTML sheet for each article. It’s a simple HTML format. This sheet should display when clicking on the “technical sheet” link:
Currently, clicking on this link only shows the title.
In the previous theme, to display the technical sheet, it was sufficient to install the following plugin ACF and add the following code:add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
$tabs['test_tab'] = array(
'title' => __( 'Scheda Tecnica', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content'
);
return $tabs;
}
function woo_new_product_tab_content() {
global $post;
$campo_personalizzato = get_post_meta( $post->ID, 'schedatecnicahtml', true );
echo '<h2>Dettagli Aggiuntivi</h2>';
echo '<p>' . $campo_personalizzato . '</p>';
}Following a sample of the table stored in the DB in a metadata fields called schedatecnicaHtml :
<html lang="en">
<head>
<meta charset="UTF-8">
<title>NVIDIA RTX A4000 16 GB 4DP GRAPHICS</title>
<style>
.center {
text-align: center;
}
</style>
</head>
<body>
<h1 class="center">NVIDIA RTX A4000 16 GB 4DP GRAPHICS</h1>
<table border="0" cellpadding="5" cellspacing="0" style="width:100%;">
<thead>
<tr>
<th colspan="2">Attributes</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2" class="center"><h3>Dimensioni e peso</h3></td>
</tr>
<tr>
<td>Altezza (mm)</td>
<td>112</td>
</tr>
<tr>
<td>Altezza imballo (mm)</td>
<td>187</td>
</tr>
<tr>
<td>Larghezza imballo (mm)</td>
<td>76.2</td>
</tr>
<tr>
<td>Peso (g)</td>
<td>500</td>
</tr>
<tr>
<td>Peso dell'imballo (g)</td>
<td>910</td>
</tr>
<tr>
<td>Profondità (mm)</td>
<td>241.3</td>
</tr>
<tr>
<td>Profondità imballo (mm)</td>
<td>419</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Memoria</h3></td>
</tr>
<tr>
<td>Ampiezza dati (bit)</td>
<td>256</td>
</tr>
<tr>
<td>Larghezza memoria della banda (massima) (GB/s)</td>
<td>448</td>
</tr>
<tr>
<td>Memoria Grafica Dedicata (GB)</td>
<td>16</td>
</tr>
<tr>
<td>Tipo memoria adattatore grafico</td>
<td>GDDR6</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Dati logistici</h3></td>
</tr>
<tr>
<td>Codice del Sistema Armonizzato (SA)</td>
<td>84733020</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Gestione energetica</h3></td>
</tr>
<tr>
<td>Consumi (W)</td>
<td>140</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Processore</h3></td>
</tr>
<tr>
<td>CUDA</td>
<td>true</td>
</tr>
<tr>
<td>CUDA cores</td>
<td>6144</td>
</tr>
<tr>
<td>Numero massimo di display per videocard</td>
<td>4</td>
</tr>
<tr>
<td>Processore grafico</td>
<td>RTX A4000</td>
</tr>
<tr>
<td>Processore grafico / fornitore</td>
<td>NVIDIA</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Prestazione</h3></td>
</tr>
<tr>
<td>Dual Link DVI</td>
<td>false</td>
</tr>
<tr>
<td>Realtà virtuale (RV) pronta</td>
<td>true</td>
</tr>
<tr>
<td>Tipo interfaccia</td>
<td>PCI Express 4.0</td>
</tr>
<tr>
<td>Versione DirectX</td>
<td>12.07</td>
</tr>
<tr>
<td>Versione modello shader</td>
<td>5.17</td>
</tr>
<tr>
<td>Versione OpenGL</td>
<td>4.68</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Connettività</h3></td>
</tr>
<tr>
<td>HDCP</td>
<td>true</td>
</tr>
<tr>
<td>Quantità DisplayPorts</td>
<td>4</td>
</tr>
<tr>
<td>versione DisplayPort</td>
<td>1.4a</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Design</h3></td>
</tr>
<tr>
<td>Numero di slot</td>
<td>1</td>
</tr>
<tr>
<td>Tipo di raffreddamento</td>
<td>Active</td>
</tr>
<tr>
<td colspan="2" class="center"><h3>Video</h3></td>
</tr>
<tr>
<td>Risoluzione massima</td>
<td>7680 x 4320 Pixel</td>
</tr>
</tbody>
</table>
</body>
</html>What are the necessary steps to ensure the technical sheet appears in its corresponding tab within the product details?
Thanks in advance,
Simone Spagna
CEOThe page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.