114 lines
2.8 KiB
Markdown
114 lines
2.8 KiB
Markdown
|
|
|
|
# WordPress Assessment Setup Guide
|
|
|
|
## Prerequisites
|
|
- Docker installed on your system
|
|
- Git installed on your system
|
|
|
|
## Setup Instructions
|
|
|
|
1. Clone the repository:
|
|
|
|
2. Build and run the Docker container:
|
|
```bash
|
|
# Build the Docker image
|
|
docker build -t wordpress-assessment .
|
|
|
|
# Run the container
|
|
docker run -d -p 8882:8882 wordpress-assessment
|
|
```
|
|
|
|
The WordPress site will be available at http://localhost:8882
|
|
|
|
|
|
3. Access WordPress Admin:
|
|
- URL: http://localhost:8882/wp-admin
|
|
- Username: admin
|
|
- Password: X0O%01c@NibHo@!aSlZqCjxV
|
|
|
|
4. Initial WordPress Configuration:
|
|
- Complete the WordPress installation if prompted
|
|
- Activate required plugins
|
|
- Configure basic WordPress settings
|
|
|
|
5. Verify Installation:
|
|
- Visit http://localhost:8882 to confirm the site is running
|
|
- Login to wp-admin to verify admin access
|
|
- Check that PHP and MySQL are working correctly
|
|
|
|
## Project Structure
|
|
|
|
### Core Files
|
|
|
|
├── README.md
|
|
|
|
├── wp-config.php # Wordpress/DB configuration
|
|
|
|
├── db.sql # Database schema
|
|
|
|
├── index.php # entry point
|
|
|
|
## NOTE
|
|
|
|
Wordpress would attempt to use sqlite if db is not configured
|
|
|
|
|
|
|
|
## Task 1: Change "Add to Cart" Button Text
|
|
|
|
### Overview
|
|
Customize the WooCommerce "Add to Cart" button text to display "Add to Basket" instead, providing a more localized shopping experience.
|
|
|
|
### Implementation
|
|
Add the following code to your custom plugin file:
|
|
|
|
|
|
|
|
## Task 2: WooCommerce Stripe Payment Integration
|
|
|
|
### Overview
|
|
Integrate Stripe payments with WooCommerce for secure credit card processing.
|
|
|
|
### Stripe Keys
|
|
pk_test_51IWQUwH8oljXErmdg6L4MhsuB6tDdmumlHFfyNaopty2U27pmRcqMX1c868zn838lGQtU1eYV6bKRSQtMFWf36VT00aNsvnTOE
|
|
|
|
sk_test_51IWQUwH8oljXErmds28KftkL6o6jYIcPgYbBdfEmCPSuAlIh0fgoS4NADcCmsIZbdQ3p5nbAeCOcGkSmo38U9BIe00BdOenrqo
|
|
|
|
Test using card: 4242 4242 4242 4242 , CVC: 123 , Expiration: future (e.g. 10/28)
|
|
|
|
### Key Features:
|
|
- Stripe payment integration
|
|
|
|
|
|
## Task 3: International Shipping Surcharge
|
|
|
|
### Overview
|
|
Add a 2% surcharge to orders being shipped to destinations outside the United States.
|
|
|
|
### Key Features:
|
|
- Automatic 2% fee calculation for international orders
|
|
- Applies only to non-US shipping addresses
|
|
- Transparent fee display during checkout
|
|
|
|
### Implementation
|
|
Add the following code to your custom plugin file:
|
|
|
|
|
|
|
|
## Task 4: Custom Thank You Page Redirect for High-Value Orders
|
|
|
|
###
|
|
This feature redirects customers to a special thank you page when their order total exceeds $100. This personalized experience helps recognize and appreciate high-value customers, potentially increasing customer satisfaction and loyalty.
|
|
|
|
### Key Features:
|
|
- Automatic redirect for orders above $100
|
|
- Custom thank you message for premium customers
|
|
|
|
### Implementation
|
|
Add the code to your custom plugin file:
|
|
|
|
|
|
|
|
|