How to change the shipping cost?
-
Hi,
I am looking for someone who can help me to change the shipping cost in this code:<?php do_action('wpsc_before_shipping_of_shopping_cart'); ?> <div id="wpsc_shopping_cart_container"> <?php if(wpsc_uses_shipping()) : ?> <table class="productcart" cellspacing="7" width="100%" style="margin:10px 0;"> <?php /*?><tr class="wpsc_shipping_info"> <td colspan="5"> <?php _e('Please choose a country below to calculate your shipping costs', 'wpsc'); ?> </td> </tr><?php */?> <?php if (!wpsc_have_shipping_quote()) : // No valid shipping quotes ?> <?php if (wpsc_have_valid_shipping_zipcode()) : ?> <tr class='wpsc_update_location'> <td colspan='5' class='shipping_error' > <?php _e('Please provide a Zipcode and click Calculate in order to continue.', 'wpsc'); ?> </td> </tr> <?php else: ?> <tr class='wpsc_update_location_error'> <td colspan='5' class='shipping_error' > <?php _e('Sorry, online ordering is unavailable to this destination and/or weight. Please double check your destination details.', 'wpsc'); ?> </td> </tr> <?php endif; ?> <?php endif; ?> <?php /*?><tr class='wpsc_change_country'> <td colspan='5'> <form name='change_country' id='change_country' action='' method='post'> <?php echo wpsc_shipping_country_list();?> <input type='hidden' name='wpsc_update_location' value='true' /> <input type='submit' name='wpsc_submit_zipcode' value='Calculate' /> </form> </td> </tr><?php */?> <?php if (wpsc_have_morethanone_shipping_quote()) :?> <?php while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method(); ?> <?php if (!wpsc_have_shipping_quotes()) { continue; } // Don't display shipping method if it doesn't have at least one quote ?> <tr class='wpsc_shipping_header'><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__(' - Choose a Shipping Rate', 'wpsc'); ?> </td></tr> <?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?> <tr class='<?php echo wpsc_shipping_quote_html_id(); ?>'> <td class='wpsc_shipping_quote_name wpsc_shipping_quote_name_<?php echo wpsc_shipping_quote_html_id(); ?>' colspan='3'> <label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label> </td> <td class='wpsc_shipping_quote_price wpsc_shipping_quote_price_<?php echo wpsc_shipping_quote_html_id(); ?>' style='text-align:center;'> <label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_value(); ?></label> </td> <td class='wpsc_shipping_quote_radio wpsc_shipping_quote_radio_<?php echo wpsc_shipping_quote_html_id(); ?>' style='text-align:center;'> <?php if(wpsc_have_morethanone_shipping_methods_and_quotes()): ?> <input type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>' <?php echo wpsc_shipping_quote_selected_state(); ?> onclick='switchmethod("<?php echo wpsc_shipping_quote_name(); ?>", "<?php echo wpsc_shipping_method_internal_name(); ?>")' value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' /> <?php else: ?> <input <?php echo wpsc_shipping_quote_selected_state(); ?> disabled='disabled' type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>' value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' /> <?php wpsc_update_shipping_single_method(); ?> <?php endif; ?> </td> </tr> <?php endwhile; ?> <?php endwhile; ?> <?php endif; ?> <?php wpsc_update_shipping_multiple_methods(); ?> <?php if (!wpsc_have_shipping_quote()) : // No valid shipping quotes ?> </table> </div> </div> <?php return; ?> <?php endif; ?> </table> <?php endif; ?> <?php $wpec_taxes_controller = new wpec_taxes_controller(); if($wpec_taxes_controller->wpec_taxes_isenabled()): ?> <table class="productcart" cellspacing="7" width="100%"> <tr class="total_price total_tax"> <td colspan="3"> <?php //echo wpsc_display_tax_label(true); ?> </td> <td colspan="2"> <span id="checkout_tax" class="pricedisplay checkout-tax"><?php //echo wpsc_cart_tax(); ?></span> </td> </tr> </table> <?php endif; ?> <?php do_action('wpsc_before_form_of_shopping_cart'); ?> The actual shipping cost is 6 euros for The Nederland and 12 euros for all the other country. Where can I change the code to insert the new values??? For example, if I wanted to put 10 euro for the Netherlands, and 14 for other nations, what should I change? This is the plugin I have: WP eCommerce 3.8.8.2 And this is the code: <?php /** * Plugin Name: WP e-Commerce * Plugin URI: https://getshopped.org/ * Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="https://getshopped.org">GetShopped.org</a> | <a href="https://getshopped.org/forums/">Support Forum</a> | <a href="https://docs.getshopped.org/">Documentation</a> * Version: 3.8.8.2 * Author: Instinct Entertainment * Author URI: https://getshopped.org/ **/ /** * WP_eCommerce * * Main WPEC Plugin Class * * @package wp-e-commerce */ class WP_eCommerce { /** * Start WPEC on plugins loaded */ function WP_eCommerce() { add_action( 'plugins_loaded', array( $this, 'init' ), 8 ); } /** * Takes care of loading up WPEC */ function init() { // Previous to initializing do_action( 'wpsc_pre_init' ); // Initialize $this->start(); $this->constants(); $this->includes(); $this->load(); // Finished initializing do_action( 'wpsc_init' ); } /** * Initialize the basic WPEC constants */ function start() { // Set the core file path define( 'WPSC_FILE_PATH', dirname( __FILE__ ) ); // Define the path to the plugin folder define( 'WPSC_DIR_NAME', basename( WPSC_FILE_PATH ) ); // Define the URL to the plugin folder define( 'WPSC_FOLDER', dirname( plugin_basename( __FILE__ ) ) ); define( 'WPSC_URL', plugins_url( '', __FILE__ ) ); //load text domain if( !load_plugin_textdomain( 'wpsc', false, '../languages/' ) ) load_plugin_textdomain( 'wpsc', false, dirname( plugin_basename( __FILE__ ) ) . '/wpsc-languages/' ); // Finished starting do_action( 'wpsc_started' ); } /** * Setup the WPEC core constants */ function constants() { // Define globals and constants used by wp-e-commerce require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-constants.php' ); // Load the WPEC core constants wpsc_core_constants(); // Is WordPress Multisite wpsc_core_is_multisite(); // Start the wpsc session wpsc_core_load_session(); // Which version of WPEC wpsc_core_constants_version_processing(); // WPEC Table names and related constants wpsc_core_constants_table_names(); // Uploads directory info wpsc_core_constants_uploads(); // Any additional constants can hook in here do_action( 'wpsc_constants' ); } /** * Include the rest of WPEC's files */ function includes() { require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-functions.php' ); require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-installer.php' ); require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-includes.php' ); // Any additional file includes can hook in here do_action( 'wpsc_includes' ); } /** * Setup the WPEC core */ function load() { // Before setup do_action( 'wpsc_pre_load' ); // Legacy action do_action( 'wpsc_before_init' ); // Setup the core WPEC globals wpsc_core_setup_globals(); // Setup the core WPEC cart wpsc_core_setup_cart(); // Load the thumbnail sizes wpsc_core_load_thumbnail_sizes(); // Load the purchase log statuses wpsc_core_load_purchase_log_statuses(); // Load unique names and checout form types wpsc_core_load_checkout_data(); // Load the gateways wpsc_core_load_gateways(); // Load the shipping modules wpsc_core_load_shipping_modules(); // Set page title array for important WPSC pages wpsc_core_load_page_titles(); // WPEC is fully loaded do_action( 'wpsc_loaded' ); } /** * WPEC Activation Hook */ function install() { global $wp_version; if((float)$wp_version < 3.0){ deactivate_plugins(plugin_basename(__FILE__)); // Deactivate ourselves wp_die( __('Looks like you\'re running an older version of WordPress, you need to be running at least WordPress 3.0 to use WP e-Commerce 3.8', 'wpsc'), __('WP e-Commerce 3.8 not compatible', 'wpsc'), array('back_link' => true)); return; } define( 'WPSC_FILE_PATH', dirname( __FILE__ ) ); require_once( WPSC_FILE_PATH . '/wpsc-core/wpsc-installer.php' ); $this->constants(); wpsc_install(); } public function deactivate() { foreach ( wp_get_schedules() as $cron => $schedule ) { wp_clear_scheduled_hook( "wpsc_{$cron}_cron_task" ); } } } // Start WPEC $wpec = new WP_eCommerce(); // Activation register_activation_hook( __FILE__, array( $wpec, 'install' ) ); register_deactivation_hook( __FILE__, array( $wpec, 'deactivate' ) ); ?>
[Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]
Can someone help me?
Thank you very much!!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to change the shipping cost?’ is closed to new replies.