how can I change this, and activate it ????
This topic contains 12 replies, has 3 voices, and was last updated by Orient Genuss 2 months ago.
-
AuthorPosts
-
December 17, 2020 at 1:44 pm #6351
how can I change this, and activate it ????
Attachments:
December 17, 2020 at 3:00 pm #6353Hi Orient,
This is customization performed by one of the users. He got through multiple Madang files and added these additional fields.
Unfortunately I can not provide you with exact steps because multiple core files need to be recreated.
December 17, 2020 at 4:07 pm #6354Hi Alinka,
I added the carbohydrates and other things in madang commerce, it works, only they are not visible in the shopping cart
“He got through multiple Madang files and added these additional fields.” …
i would like to list different products as one package, at the end it has to be displayed in the shopping cart or in the checkout, but it is there with 4 items. I would like to state the nutritional values in full.-
This reply was modified 2 months ago by
Orient Genuss.
Attachments:
December 18, 2020 at 9:27 am #6357This should be added in madang > woocommerce > cart > cart-totals.php files
December 18, 2020 at 9:44 am #6358I’ll check it out, thank you very much. will contact me again.
December 18, 2020 at 9:30 pm #6359Hallo Alinka,
I can’t get any further, what’s wrong, shopping cart isn’t loading ??? here what i changed
madang commerce is ok, works, only cart total doesn’t work ???*/
defined( ‘ABSPATH’ ) || exit;
$madang_brennwertsKcal_total = $madang_brennwertsKj_total = $madang_fetts_total = $madang_davonGesättigteFettsäurens_total = $madang_kohlenhydrates_total = $madang_davonZuckers_total = $madang_ballaststoffes_total = $madang_eiweißs_total = $madang_salzs_total = 0;
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$_product = apply_filters( ‘woocommerce_cart_item_product’, $cart_item[‘data’], $cart_item, $cart_item_key );
$product_id = apply_filters( ‘woocommerce_cart_item_product_id’, $cart_item[‘product_id’], $cart_item, $cart_item_key );$madang_title = get_post_meta( $product_id, ‘madang_title’, ”);
if( sizeof($madang_title)==0 ) $madang_title[0] = ”;$madang_Brennwert (kcal) = get_post_meta( $product_id, ‘madang_brennwertsKcal’, ”);
if( sizeof($madang_brennwertsKcal)==0 ) { $madang_brennwertsKcal[0] = ”; }else{ $madang_brennwertsKcal_total += (intval($madang_brennwertsKcal[0]) * $cart_item[‘quantity’]); }$madang_Brennwert (kj) = get_post_meta( $product_id, ‘madang_brennwertsKj’, ”);
if( sizeof($madang_brennwertsKj)==0 ) { $madang_brennwertsKj[0] = ”; }else{ $madang_brennwertsKj_total += (intval($madang_brennwertsKj[0]) * $cart_item[‘quantity’]); }$madang_Fett = get_post_meta( $product_id, ‘madang_fetts’, ”);
if( sizeof($madang_fetts)==0 ) { $madang_fetts[0] = ”; }else{ $madang_fetts_total += (intval($madang_fetts[0]) * $cart_item[‘quantity’]); }$madang_…davon gesättigte Fettsäuren = get_post_meta( $product_id, ‘madang_davonGesättigteFettsäurens’, ”);
if( sizeof($madang_davonGesättigteFettsäurens)==0 ) { $madang_davonGesättigteFettsäurens[0] = ”; }else{ $madang_davonGesättigteFettsäurens_total += (intval($madang_davonGesättigteFettsäurens[0]) * $cart_item[‘quantity’]); }$madang_Kohlenhydrate = get_post_meta( $product_id, ‘madang_kohlenhydrates’, ”);
if( sizeof($madang_kohlenhydrates)==0 ) { $madang_kohlenhydrates[0] = ”; }else{ $madang_kohlenhydrates_total += (intval($madang_kohlenhydrates[0]) * $cart_item[‘quantity’]); }$madang_…davon Zucker = get_post_meta( $product_id, ‘madang_davonZuckers’, ”);
if( sizeof($madang_davonZuckers)==0 ) { $madang_davonZuckers[0] = ”; }else{ $madang_davonZuckers_total += (intval($madang_davonZuckers[0]) * $cart_item[‘quantity’]); }$madang_Ballaststoffe = get_post_meta( $product_id, ‘madang_ballaststoffes’, ”);
if( sizeof($madang_ballaststoffes)==0 ) { $madang_ballaststoffes[0] = ”; }else{ $madang_ballaststoffes_total += (intval($madang_ballaststoffes[0]) * $cart_item[‘quantity’]); }$madang_Eiweiß = get_post_meta( $product_id, ‘madang_eiweißs’, ”);
if( sizeof($madang_eiweißs)==0 ) { $madang_eiweißs[0] = ”; }else{ $madang_eiweißs_total += (intval($madang_eiweißs[0]) * $cart_item[‘quantity’]); }$madang_Salz = get_post_meta( $product_id, ‘madang_salzs’, ”);
if( sizeof($madang_salzs)==0 ) { $madang_salzs[0] = ”; }else{ $madang_salzs_total += (intval($madang_salzs[0]) * $cart_item[‘quantity’]); }}
?>
<div class=”cart_totals <?php echo ( WC()->customer->has_calculated_shipping() ) ? ‘calculated_shipping’ : ”; ?>”><?php if ( 1 != get_theme_mod( ‘madang_cart_nutrition’ ) ) : ?>
<!– nutrition–>
<div class=”col-xs-12 col-sm-5 wow fadeInLeft”>
<div class=”nutrition-fact nutrition-fact-ajax”>
<h6><?php echo esc_html__(‘Nutrition Facts Calculated’, ‘madang’); ?></h6>
<div class=”facts-table”>
<table>
<tbody>
<tr>
<td><span><?php echo esc_html__(‘Brennwert (kcal)’, ‘madang’); ?></span></td>
<td><span class=”cart_brennwertsKcal”><?php echo esc_attr(number_format($madang_brennwertsKcal_total,0,” “,” “).$metering_cal); ?></span></td>
</tr>
<tr>
<td><span class=”cart_brennwertsKj”><?php echo esc_html__(‘Brennwert (kj)’, ‘madang’); ?></span></td>
<td><span><?php echo esc_attr(number_format($madang_brennwertsKj_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘Fett’, ‘madang’); ?></span></td>
<td><span class=”cart_fetts”><?php echo esc_attr(number_format($madang_fetts_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘…davon gesättigte Fettsäuren’, ‘madang’); ?></span></td>
<td><span class=”cart_davonGesättigteFettsäurens”><?php echo esc_attr(number_format($madang_davonGesättigteFettsäurens_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘Kohlenhydrate’, ‘madang’); ?></span></td>
<td><span class=”cart_kohlenhydrates”><?php echo esc_attr(number_format($madang_kohlenhydrates_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘…davon Zucker’, ‘madang’); ?></span></td>
<td><span class=”cart_davonZuckers”><?php echo esc_attr(number_format($madang_davonZuckers_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘Ballaststoffe’, ‘madang’); ?></span></td>
<td><span class=”cart_ballaststoffes”><?php echo esc_attr(number_format($madang_ballaststoffes_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘Eiweiß’, ‘madang’); ?></span></td>
<td><span class=”cart_eiweißs”><?php echo esc_attr(number_format($madang_eiweißs_total,0,” “,” “).$metering); ?></span></td>
</tr>
<tr>
<td><span><?php echo esc_html__(‘Salz’, ‘madang’); ?></span></td>
<td><span class=”cart_salzs”><?php echo esc_attr(number_format($madang_salzs_total,0,” “,” “).$metering); ?></span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!– nutritation ends–><?php //save nutrition calculations
set_theme_mod(‘madang_brennwertsKcal_total’, esc_attr(number_format($madang_brennwertsKcal_total,0,” “,” “).$metering_cal));
set_theme_mod(‘madang_brennwertsKj_total’, esc_attr(number_format($madang_brennwertsKj_total,0,” “,” “).$metering));
set_theme_mod(‘madang_fetts_total’, esc_attr(number_format($madang_fetts_total,0,” “,” “).$metering));
set_theme_mod(‘madang_davonGesättigteFettsäurens_total’, esc_attr(number_format($madang_davonGesättigteFettsäurens_total,0,” “,” “).$metering));
set_theme_mod(‘madang_kohlenhydrates_total’, esc_attr(number_format($madang_kohlenhydrates_total,0,” “,” “).$metering));
set_theme_mod(‘madang_davonZuckers_total’, esc_attr(number_format($madang_davonZuckers_total,0,” “,” “).$metering));
set_theme_mod(‘madang_ballaststoffes_total’, esc_attr(number_format($madang_ballaststoffes_total,0,” “,” “).$metering));
set_theme_mod(‘madang_eiweißs_total’, esc_attr(number_format($madang_eiweißs_total,0,” “,” “).$metering));
set_theme_mod(‘madang_salzs_total’, esc_attr(number_format($madang_salzs_total,0,” “,” “).$metering));
?><?php endif; ?>
Attachments:
December 19, 2020 at 10:54 am #6361Something is wrong with the code. I recommend you perform very small portions of modifications in order to live debug your changes.
In order to assist you further here I need to assign this task to a software engineer. Unfortunately this is something that is not covered by your support license.
December 19, 2020 at 11:45 am #6362it would be completely sufficient where I insert the changes.
your development team can take a look at it.
December 19, 2020 at 7:57 pm #6364I get this message
how do i get the support from madang ???? e-mail ???
here the message,
PHP Syntax Check: Parse error: syntax error, unexpected
December 20, 2020 at 8:32 am #6365You can request engineering support here: https://kenzap.com/wordpress-website-audit-and-bug-fixing-1014971/
$25 package is sufficient for a start.
December 20, 2020 at 11:07 am #6368I’ve already paid $ 75, now $ 25 ???
Guys that’s not fair !!!December 20, 2020 at 11:31 am #6371You have paid for Madang product $75 however it costed us $5000 USD to design and develop.
You support license only covers basic support that relates to questions about product usage.
When it comes to customizations related to code adjustments we need to assign a software engineer to work specifically on your case.
This work work has to be covered separately. As an average engineering salary starts from $1000/month we do not have such a capacity to provide software development support free of charge.
Apologies for the inconvenience caused.
December 20, 2020 at 1:22 pm #6375no problem, I’ll cancel it !!!! thank you you helped me a lot!
-
AuthorPosts
Please sign in to reply to this question.