Changeset 2900195
- Timestamp:
- 04/17/2023 01:17:09 PM (3 years ago)
- Location:
- expivi/trunk
- Files:
-
- 16 edited
-
classes/class-expivi.php (modified) (1 diff)
-
classes/connect-rep/class-expivi-save-design-rep-email-builder.php (modified) (2 diffs)
-
classes/core/loggers/class-expivi-logger-bugsnag.php (modified) (1 diff)
-
classes/helpers/class-expivi-configuration-helper.php (modified) (3 diffs)
-
classes/save-design/class-expivi-save-design-controller.php (modified) (2 diffs)
-
classes/save-design/class-expivi-save-design-email-builder.php (modified) (2 diffs)
-
classes/woocommerce/admin/class-expivi-admin-product-settings.php (modified) (3 diffs)
-
classes/woocommerce/class-expivi-configurator.php (modified) (1 diff)
-
expivi.php (modified) (1 diff)
-
languages/expivi-nl_NL.mo (modified) (previous)
-
languages/expivi-nl_NL.po (modified) (1 diff)
-
languages/expivi.pot (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
templates/emails/connect-rep/email_connect_rep_content.phtml (modified) (1 diff)
-
templates/emails/save-design/email_save_design_content.phtml (modified) (1 diff)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
expivi/trunk/classes/class-expivi.php
r2897250 r2900195 29 29 * @var string 30 30 */ 31 public $version = '2.7. 5';31 public $version = '2.7.6'; 32 32 33 33 /** -
expivi/trunk/classes/connect-rep/class-expivi-save-design-rep-email-builder.php
r2714461 r2900195 70 70 */ 71 71 public function __construct( array $data ) { 72 $this->configuration = $data['configuration'];72 $this->configuration = json_decode( $data['configuration'], true ); 73 73 $this->user_data = $data['user_data']; 74 74 $this->permalink = $data['permalink']; … … 102 102 'emails/connect-rep/email_connect_rep_content.phtml', 103 103 array( 104 'share_link' => $this->share_link, 105 'user_data' => $this->user_data, 104 'share_link' => $this->share_link, 105 'user_data' => $this->user_data, 106 'shop_name' => get_bloginfo( 'name' ), 107 'configuration' => $this->configuration, 106 108 ) 107 109 ), -
expivi/trunk/classes/core/loggers/class-expivi-logger-bugsnag.php
r2680809 r2900195 43 43 try { 44 44 $this->bugsnag = Bugsnag\Client::make( '985b561a3ca9a598cdeea732e3e2f6c6' ); 45 $this->bugsnag->setAppVersion( XPV()->version ); 46 $this->bugsnag->setReleaseStage( 'production' ); 45 47 // Note: Do not register Bugsnag handler as it will capture all exceptions on website. 46 48 $this->enabled = true; -
expivi/trunk/classes/helpers/class-expivi-configuration-helper.php
r2892766 r2900195 13 13 * Retrieves the configuration hash from the configuration object 14 14 * 15 * @param Mixed $configuration The configuration array.15 * @param mixed $configuration The configuration array. 16 16 * 17 17 * @return string 18 18 */ 19 public function get_configuration_hash( $configuration ) {19 public function get_configuration_hash( $configuration ): string { 20 20 $configuration_unslashed = wp_unslash( $configuration ); 21 21 $configured_products = json_decode( $configuration_unslashed, true ); … … 27 27 * Retrieves and creates the configuration share link. 28 28 * 29 * @param Mixed $configuration The configuration array.29 * @param mixed $configuration The configuration array. 30 30 * @param mixed $permalink The base url from the request. 31 31 * @param string $directory Fixed set upload directory. 32 32 * @return string 33 33 */ 34 public function get_share_link_url( $configuration, $permalink, $directory ){34 public function get_share_link_url( $configuration, $permalink, string $directory ): string { 35 35 $hash = $this->get_configuration_hash( $configuration ); 36 36 $sub_dir = XPV()->fs->combine( $directory, $hash ); … … 88 88 * @return string 89 89 */ 90 private function get_config_hash( $configured_product, int $price, array $meta_data = array() ) {90 private function get_config_hash( $configured_product, int $price, array $meta_data = array() ): string { 91 91 $arr = array( 92 92 'articles' => $configured_product['articles'], -
expivi/trunk/classes/save-design/class-expivi-save-design-controller.php
r2837427 r2900195 55 55 56 56 if ( ! empty( $_POST['configuration'] ) ) { 57 $configuration = s anitize_text_field( wp_unslash( $_POST['configuration'] ));57 $configuration = stripslashes( $_POST['configuration'] ); 58 58 } 59 59 … … 122 122 * Process save-design form. 123 123 * 124 * @throws Exception Throws an exception when the form cannot be buil d.124 * @throws Exception Throws an exception when the form cannot be built. 125 125 */ 126 126 public function process_form(): void { -
expivi/trunk/classes/save-design/class-expivi-save-design-email-builder.php
r2714461 r2900195 62 62 */ 63 63 public function __construct( array $data ) { 64 $this->configuration = $data['configuration'];64 $this->configuration = json_decode( $data['configuration'], true ); 65 65 $this->user_data = $data['user_data']; 66 66 $this->permalink = $data['permalink']; … … 103 103 'emails/save-design/email_save_design_content.phtml', 104 104 array( 105 'share_link' => $this->share_link, 106 'user_data' => $this->user_data, 107 'shop_name' => get_bloginfo( 'name' ), 105 'share_link' => $this->share_link, 106 'user_data' => $this->user_data, 107 'shop_name' => get_bloginfo( 'name' ), 108 'configuration' => $this->configuration, 108 109 ) 109 110 ), -
expivi/trunk/classes/woocommerce/admin/class-expivi-admin-product-settings.php
r2825298 r2900195 111 111 $hide_price_when_zero = $product->meta_exists( 'xpv_hide_price_when_zero' ) && $product->get_meta( 'xpv_hide_price_when_zero' ); 112 112 $enable_pdf_download = $product->meta_exists( 'xpv_enable_pdf_download' ) && $product->get_meta( 'xpv_enable_pdf_download' ); 113 $camera_position_thumbnail = $product->meta_exists( 'xpv_camera_position_thumbnail' ) ? (int) $product->get_meta( ' camera_position_thumbnail' ) : 0;113 $camera_position_thumbnail = $product->meta_exists( 'xpv_camera_position_thumbnail' ) ? (int) $product->get_meta( 'xpv_camera_position_thumbnail' ) : 0; 114 114 $price_layout = $product->meta_exists( 'xpv_price_layout' ) ? (int) $product->get_meta( 'xpv_price_layout' ) : 0; 115 115 $pdf_orientation = $product->meta_exists( 'xpv_pdf_orientation' ) ? $product->get_meta( 'xpv_pdf_orientation' ) : 'portrait'; … … 228 228 } 229 229 230 if ( array_key_exists( 'xpv_show_progress', $_POST ) && true === (bool) $_POST['xpv_show_progress'] ) { 231 update_post_meta( $product_id, 'xpv_show_progress', '1' ); 232 } else { 233 update_post_meta( $product_id, 'xpv_show_progress', '0' ); 234 } 235 230 236 if ( array_key_exists( 231 237 'xpv_camera_position_thumbnail', … … 237 243 sanitize_text_field( wp_unslash( $_POST['xpv_camera_position_thumbnail'] ) ) 238 244 ); 239 } else {240 update_post_meta( $product_id, 'xpv_show_progress', '0' );241 }242 243 if ( array_key_exists(244 'xpv_hide_price_when_zero',245 $_POST246 ) && true === (bool) $_POST['xpv_hide_price_when_zero'] ) {247 update_post_meta( $product_id, 'xpv_camera_position_thumbnail', sanitize_text_field( $_POST['xpv_camera_position_thumbnail'] ) );248 245 } else { 249 246 delete_post_meta( $product_id, 'xpv_camera_position_thumbnail' ); -
expivi/trunk/classes/woocommerce/class-expivi-configurator.php
r2825298 r2900195 246 246 array( 247 247 'theme' => $theme, 248 'btnOnForm' => $this->get_setting( 'smd_button_on_form', ' ', 'expivi-smd-settings' ),248 'btnOnForm' => $this->get_setting( 'smd_button_on_form', 'Save my design', 'expivi-smd-settings' ), 249 249 'state_selection' => $state_selection, 250 250 'states_html_options' => empty( $states_html_options ) ? '' : $states_html_options, -
expivi/trunk/expivi.php
r2897250 r2900195 4 4 * Description: Complex visualisation and configuration made simple 5 5 * Plugin URI: https://wordpress.org/plugins/expivi/ 6 * Version: 2.7. 56 * Version: 2.7.6 7 7 * Author: Expivi 8 8 * Author URI: https://www.expivi.com/ -
expivi/trunk/languages/expivi-nl_NL.po
r2897250 r2900195 5 5 "Project-Id-Version: Expivi 1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expivi\n" 7 "POT-Creation-Date: 2023-04-1 1 11:25+0200\n"8 "PO-Revision-Date: 2023-04-1 1 11:25+0200\n"7 "POT-Creation-Date: 2023-04-17 10:33+0200\n" 8 "PO-Revision-Date: 2023-04-17 10:33+0200\n" 9 9 "Last-Translator: \n" 10 10 "Language-Team: \n" -
expivi/trunk/languages/expivi.pot
r2897250 r2900195 6 6 "Project-Id-Version: Expivi 1.0\n" 7 7 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expivi\n" 8 "POT-Creation-Date: 2023-04-1 1 11:25+0200\n"8 "POT-Creation-Date: 2023-04-17 10:33+0200\n" 9 9 "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n" 10 10 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
expivi/trunk/readme.txt
r2897250 r2900195 5 5 Tested up to: 6.1.1 6 6 Requires PHP: 7.1 7 Stable tag: 2.7. 57 Stable tag: 2.7.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 36 36 37 37 == Changelog == 38 = 2.7.6 2023/04/17 = 39 * Fixed: Fixed 'Camera position' and 'Show progress' setting in product settings. 40 * New: Configured product details are now shown in Save My Design mails. 41 38 42 = 2.7.5 2023/04/11 = 39 43 * Fixed: Update viewer to 1.25.2. 40 * Fixed: Fixed 'Camera position' and 'Show progress' setting in product settings.41 44 42 45 = 2.7.4 2023/04/03 = -
expivi/trunk/templates/emails/connect-rep/email_connect_rep_content.phtml
r2714461 r2900195 1 1 <?php 2 2 /** 3 * Email View - Connect Rep Content3 * Email View - Connect Representative Content 4 4 * 5 * @version 1.0 5 * @version 1.0.1 6 6 */ 7 7 8 8 if ( ! defined( 'ABSPATH' ) ) { 9 exit;9 exit; 10 10 } 11 12 /** @var mixed $user_data Data filled by user in Save My Design form. */ 13 /** @var string $share_link Link pointing to product page including id of the configuration so the configuration will be loaded. */ 14 /** @var string $shop_name Name of the shop. */ 15 /** @var array $configuration Array of configured products. */ 11 16 ?> 12 17 <div> 13 <h1 style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#2f3133;font-size:19px;font-weight:bold;margin-top:0;text-align:left">Hi</h1> 14 <br> 15 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left"> 16 <?php echo $user_data['name'] ?? 'A customer'?> has requested contact with a sale representative. 17 </p> 18 <br> 19 <table style="border-collapse:collapse;border-spacing:0;text-align: center; width:100%;" class="tg"> 20 <tbody> 21 <?php foreach($user_data as $key => $data): ?> 22 <tr> 23 <td style="border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;vertical-align:top;word-break:normal"> 24 <p style="text-transform:capitalize;font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;font-size:16px;line-height:1.5em;margin-top:0;text-align:center"> 25 <strong><?php echo $key ?></strong> 26 </p> 27 </td> 28 <td style="border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;vertical-align:top;word-break:normal"> 29 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:center"> 30 <?php echo $data ?> 31 </p> 32 </td> 33 </tr> 34 <?php endforeach; ?> 35 </tbody> 36 </table> 37 <br> 38 <a href="<?php echo esc_attr($share_link); ?>" style="margin-right:auto;margin-left:auto;font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;border-radius:3px;color:#fff;display:inline-block;text-decoration:none;background-color:#3f3f3f;border-top:10px solid #3f3f3f;border-right:18px solid #3f3f3f;border-bottom:10px solid #3f3f3f;border-left:18px solid #3f3f3f"> 39 Go to the saved design 40 </a> 41 <br> 42 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left">Regards,</p> 43 <strong style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left">Expivi</strong> 18 <h1 style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#2f3133;font-size:19px;font-weight:bold;margin-top:0;text-align:left">Hi</h1> 19 <br> 20 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left"> 21 <?php echo $user_data['name'] ?? 'A customer'?> has requested contact with a sale representative. 22 </p> 23 <br> 24 <table style="border-collapse:collapse;border-spacing:0;text-align: center; width:100%;" class="tg"> 25 <tbody> 26 <?php foreach($user_data as $key => $data): ?> 27 <tr> 28 <td style="border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;vertical-align:top;word-break:normal"> 29 <p style="text-transform:capitalize;font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;font-size:16px;line-height:1.5em;margin-top:0;text-align:center"> 30 <strong><?php echo $key ?></strong> 31 </p> 32 </td> 33 <td style="border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;vertical-align:top;word-break:normal"> 34 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:center"> 35 <?php echo $data ?> 36 </p> 37 </td> 38 </tr> 39 <?php endforeach; ?> 40 </tbody> 41 </table> 42 <br> 43 <a href="<?php echo esc_attr($share_link); ?>" style="margin-right:auto;margin-left:auto;font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;border-radius:3px;color:#fff;display:inline-block;text-decoration:none;background-color:#3f3f3f;border-top:10px solid #3f3f3f;border-right:18px solid #3f3f3f;border-bottom:10px solid #3f3f3f;border-left:18px solid #3f3f3f"> 44 Go to the saved design 45 </a> 46 <br> 47 <br> 48 49 <p>Configuration details:</p> 50 <?php 51 // Display attributes of configured products. 52 if ( ! empty( $configuration ) ) { 53 foreach ( $configuration as $configured_product ) { 54 $attributes = $configured_product['attributes']; 55 foreach ( $attributes as $attribute ) { 56 if ( ! empty( $attribute['attribute_name'] ) && ! empty( $attribute['attribute_value_name'] ) ) { 57 echo '<b>' . esc_html( $attribute['attribute_name'] ) . '</b> ' . esc_html( $attribute['attribute_value_name'] ) . '<br />'; 58 } 59 } 60 } 61 } 62 ?> 63 64 <br> 65 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left">Regards,</p> 66 <strong style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left"><?php echo $shop_name; ?></strong> 44 67 </div> -
expivi/trunk/templates/emails/save-design/email_save_design_content.phtml
r2714461 r2900195 3 3 * Email View - Save Design Content 4 4 * 5 * @version 1.0 5 * @version 1.0.1 6 6 */ 7 7 8 8 if ( ! defined( 'ABSPATH' ) ) { 9 exit;9 exit; 10 10 } 11 12 /** @var mixed $user_data Data filled by user in Save My Design form. */ 13 /** @var string $share_link Link pointing to product page including id of the configuration so the configuration will be loaded. */ 14 /** @var string $shop_name Name of the shop. */ 15 /** @var array $configuration Array of configured products. */ 11 16 ?> 17 18 12 19 <h1 style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#2f3133;font-size:19px;font-weight:bold;margin-top:0;text-align:left">Hi <?php echo $user_data['name']?></h1> 13 20 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left">Here is your saved design!</p> 14 21 <a href="<?php echo esc_attr($share_link); ?>" style="margin-right:auto;margin-left:auto;font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;border-radius:3px;color:#fff;display:inline-block;text-decoration:none;background-color:#3f3f3f;border-top:10px solid #3f3f3f;border-right:18px solid #3f3f3f;border-bottom:10px solid #3f3f3f;border-left:18px solid #3f3f3f"> 15 See my saved design22 See my saved design 16 23 </a> 24 <br> 25 <br> 26 27 <p>Configuration details:</p> 28 <?php 29 // Display attributes of configured products. 30 if ( ! empty( $configuration ) ) { 31 foreach ( $configuration as $configured_product ) { 32 $attributes = $configured_product['attributes']; 33 foreach ( $attributes as $attribute ) { 34 if ( ! empty( $attribute['attribute_name'] ) && ! empty( $attribute['attribute_value_name'] ) ) { 35 echo '<b>' . esc_html( $attribute['attribute_name'] ) . '</b> ' . esc_html( $attribute['attribute_value_name'] ) . '<br />'; 36 } 37 } 38 } 39 } 40 ?> 41 17 42 <br> 18 43 <p style="font-family:'Work Sans',Avenir,Helvetica,sans-serif;box-sizing:border-box;color:#74787e;font-size:16px;line-height:1.5em;margin-top:0;text-align:left">Regards,</p> -
expivi/trunk/vendor/composer/installed.php
r2897250 r2900195 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '2.7. 5',4 'version' => '2.7. 5.0',3 'pretty_version' => '2.7.6', 4 'version' => '2.7.6.0', 5 5 'type' => 'library', 6 6 'install_path' => __DIR__ . '/../../', … … 39 39 ), 40 40 'expivi/expivi-woocommerce' => array( 41 'pretty_version' => '2.7. 5',42 'version' => '2.7. 5.0',41 'pretty_version' => '2.7.6', 42 'version' => '2.7.6.0', 43 43 'type' => 'library', 44 44 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.