get_product($product->ID); //posso usare l'id con lo shortcode oppure con la classe che modella il singolo prodotto $shortcode = do_shortcode('[product_page id="'.$product->id.'"]'); $shortcode_parse = str_get_html($shortcode); $shortcode_parse->find('.product form',0)->attr['action'] = 'cart.php'; // cambio i link alle categorie foreach($shortcode_parse->find('.posted_in a') as $element) $element->href = 'category.php'.substr($element->href, strpos($element->href, "/?") + 1); // cambio i link che portano alla pagina del prodotto (anche quello del add to cart button) ad esempio i related product alla fine della pagina prodotto foreach($shortcode_parse->find('.products a') as $element) $element->href = 'product.php'.substr($element->href, strpos($element->href, "/?") + 1); // cambio il link dell add to cart button foreach($shortcode_parse->find('.product_type_simple') as $element) $element->href = 'cart.php?'.substr($element->href, strpos($element->href, "?") + 1); //$element->href = str_replace ('product.php', 'cart.php', $element->href); ?>

Nevada Travel Network Bookstore

Postal Drawer F

Virginia City, Nevada USA

775-847-0321

hq@nevadatravel.net

Our Mission

Our job is to connect readers with interesting books on Nevada. As Nevada enthusiasts, we seek to expand our knowledge of  the past and present condition of the most interesting state in the Union.