A client has asked that we move 600 blog posts from ASP.NET to either Square Space or WordPress. I need to know if this can be done. I have looked for the last hour and have not found a definitive answer. Can anyone answer whether blogs, no images just text, can be migrated from ASP.NET to WordPress?
Thanks in advance.
]]>Would anyone be able to guide me in connecting to the SQL database of the .NET application & send the data from woocommerce products to that particular application?
I found the code in another blog as to how to do this but I’m not sure whether it is the right approach.
/* after an order has been processed, we will use the 'woocommerce_thankyou' hook, to add our function, to send the data */
add_action('woocommerce_thankyou', 'wdm_send_order_to_ext');
function wdm_send_order_to_ext( $order_id ){
// get order object and order details
$order = new WC_Order( $order_id );
$email = $order->billing_email;
$phone = $order->billing_phone;
$shipping_type = $order->get_shipping_method();
$shipping_cost = $order->get_total_shipping();
// set the address fields
$user_id = $order->user_id;
$address_fields = array('country',
'title',
'first_name',
'last_name',
'company',
'address_1',
'address_2',
'address_3',
'address_4',
'city',
'state',
'postcode');
$address = array();
if(is_array($address_fields)){
foreach($address_fields as $field){
$address['billing_'.$field] = get_user_meta( $user_id, 'billing_'.$field, true );
$address['shipping_'.$field] = get_user_meta( $user_id, 'shipping_'.$field, true );
}
}
// get coupon information (if applicable)
$cps = array();
$cps = $order->get_items( 'coupon' );
$coupon = array();
foreach($cps as $cp){
// get coupon titles (and additional details if accepted by the API)
$coupon[] = $cp['name'];
}
// get product details
$items = $order->get_items();
$item_name = array();
$item_qty = array();
$item_price = array();
$item_sku = array();
foreach( $items as $key => $item){
$item_name[] = $item['name'];
$item_qty[] = $item['qty'];
$item_price[] = $item['line_total'];
$item_id = $item['product_id'];
$product = new WC_Product($item_id);
$item_sku[] = $product->get_sku();
}
/* for online payments, send across the transaction ID/key. If the payment is handled offline, you could send across the order key instead */
$transaction_key = get_post_meta( $order_id, '_transaction_id', true );
$transaction_key = empty($transaction_key) ? $_GET['key'] : $transaction_key;
// set the username and password
$api_username = 'testuser';
$api_password = 'testpass';
// to test out the API, set $api_mode as ‘sandbox’
$api_mode = 'sandbox';
if($api_mode == 'sandbox'){
// sandbox URL example
$endpoint = "https://sandbox.example.com/";
}
else{
// production URL example
$endpoint = "https://example.com/";
}
// setup the data which has to be sent
$data = array(
'apiuser' => $api_username,
'apipass' => $api_password,
'customer_email' => $email,
'customer_phone' => $phone,
'bill_firstname' => $address['billing_first_name'],
'bill_surname' => $address['billing_last_name'],
'bill_address1' => $address['billing_address_1'],
'bill_address2' => $address['billing_address_2'],
'bill_city' => $address['billing_city'],
'bill_state' => $address['billing_state'],
'bill_zip' => $address['billing_postcode'],
'ship_firstname' => $address['shipping_first_name'],
'ship_surname' => $address['shipping_last_name'],
'ship_address1' => $address['shipping_address_1'],
'ship_address2' => $address['shipping_address_2'],
'ship_city' => $address['shipping_city'],
'ship_state' => $address['shipping_state'],
'ship_zip' => $address['shipping_postcode'],
'shipping_type' => $shipping_type,
'shipping_cost' => $shipping_cost,
'item_sku' => implode(',', $item_sku),
'item_price' => implode(',', $item_price),
'quantity' => implode(',', $item_qty),
'transaction_key' => $transaction_key,
'coupon_code' => implode( ",", $coupon )
);
// send API request via cURL
$ch = curl_init();
/* set the complete URL, to process the order on the external system. Let’s consider https://example.com/buyitem.php is the URL, which invokes the API */
curl_setopt($ch, CURLOPT_URL, $endpoint."buyitem.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
curl_close ($ch);
// the handle response
if (strpos($response,'ERROR') !== false) {
print_r($response);
} else {
// success
}
}
P.S. I have guest checkout enabled in the wordpress website but I have a login for the application. The application is running on an external database & the connection to that should be made.
Thanks in advance!
]]>Wordfence was fine on my Windows hosting until I updated to 6.1.x – here I outlined the issue in detail and things I’ve tried but no luck so far.
Briefly, would like the ability to translate/add the line below to web.config since .htaccess nor php.ini as an option.
auto_prepend_file = 'C:\HostingSpaces\username\domain.com\wwwroot/wordfence-waf.php'
Would greatly appreciate suggestions and/or solution on this matter.
Cheers,
JM
https://www.ads-software.com/plugins/wordfence/
]]>Is it possible to have WordPress blog inside asp.net mvc project which i am working on ?
I want to have the same look and feel is it possible too ?
]]>These were developed on a space at discountasp.net because we were originally going to have custom CMS built for us but that didn’t happen.
I’ve pretty much determined I’m going to reinstall my themes in our new hosting environment (typical shared hosting/Linux cpanel)… is there anyway to copy the databases and back up wordpress and import it somehow or should I just copy+paste and reupload everything??
]]>The configuration section ‘phpNet’ cannot be read because it is missing a section declaration
My web.config file is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</handlers>
<defaultDocument>
<files>
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors errorMode="Detailed">
<clear />
</httpErrors>
</system.webServer>
<system.web>
<globalization responseEncoding="utf-8" fileEncoding="utf-8" />
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
<pages validateRequest="false" />
</system.web>
<phpNet>
<compiler>
<set name="EnableStaticInclusions" value="true" />
</compiler>
<classLibrary>
<add assembly="PhpNetMySql, Version=3.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql" />
<add assembly="php_xml.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="xml" />
<add assembly="php_image.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image" />
<add assembly="php_zlib.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="zlib" />
</classLibrary>
<error-control>
<set name="DisplayErrors" value="false" phpName="display_errors" />
</error-control>
<globalization>
<set name="PageEncoding" value="utf-8" />
</globalization>
<bcl>
<mailer>
<!-- SMTP server name used for sending e-mails. -->
<set name="SmtpServer" value="127.0.0.1" phpName="SMTP" />
<!-- SMTP server port used for sending e-mails. -->
<set name="SmtpPort" value="25" phpName="smtp_port" />
<!-- The default value of "From" header. -->
<set name="DefaultFromHeader" value="[email protected]" phpName="sendmail_from" />
</mailer>
</bcl>
<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</phpNet>
</configuration>
Any help would be appreciated as I am stuck in this matter and its quite frustrating for me.
Thanks.
I am building a website in WordPress and need to integrate a webservice that requires:
? Windows 2003 Server (32bit)
? IIS 6.0 (32bit)
? ASP .NET 2.0 or higher
? COM connectivity to R1-2008 or higher Server(s)
Can I still make it happen? I don’t want to give up on the WordPress.
I read that I may be able to do so if I have the host run both PHP and IIS on the my server? and then have the WP and the ASP.Net code in 2 different folders?
Thank you so much!
]]>What could be a possible solution?
]]>I’d like to set the height to auto so that no scrollbars show and so that the entire content is displayed.
Can you help look into this? I’ve looked at other posts with similar issues and they have not been resolved.
Please advice.
Greatly appreciated!
Perla
The current live site is audiowell.com; the demo site is at audiowell.iamshaun.com. Any ideas to help me from re-inventing the wheel would be appreciated.
]]>