All Posts in commerce

June 28, 2012 - Comments Off on Drupal 7 Commerce Coupons: Unlimited redemptions

Drupal 7 Commerce Coupons: Unlimited redemptions

The Commerce module and its add-ons are very powerful. The coupon module has recently undergone a major rewrite and its one we're using for one of our sites. In this post we'll talk about making a modification to one of the coupon rules to allow for unlimited coupon redemptions if you enter '0' (zero) in the Number of uses field when editing a coupon.

In Workflow > Rules edit the rule Coupon Validation: Check the number of redemptions.
Add an AND condition
Then, add a Data Comparison condition
For the data to compare choose: coupon:commerce-coupon-number-of-uses
Choose the equals operator, and 0 as the value.
Next, we want to negate this condition. See the post on Drupal Rule(s)! for an explanation of this option.
Lastly, save the new condition and drag it and the Entity has field condition under the And operator.

Coupon conditions

Coupon conditions

That's it. Now you can redeem a coupon as many times as you want.

Drupal's well thought-out and structured framework allows for changes to functionality to be done at a high level instead of always needing to dig into code and/or write Tarzan-like, custom PHP. This in turn, saves other developers and designers a lot of time. Thanks Drupal!

Links:

Published by: chazcheadle in The Programming Mechanism
Tags: , ,

June 21, 2012 - Comments Off on Drupal Rule(s)!

Drupal Rule(s)!

 Fitness Tips To Help You See Impressive Results

MARCH 23, 2020

Being fit has many physical and mental benefits for your health. However, many people may not understand what it fully requires to fully reach their goals. Follow these 5 fitness tips to help you see impressive results. Check these profit singularity reviews.

1. Stay Consistent

Consistency will lead you on the road to success the quickest. It doesn’t matter what your goals are. If you have consistency and develop a routine that you know that you can rely on, it will lead to you reaching your goals quicker.

For example, if you want to lose weight, you should be consistent in your cardio exercise regimen. This consistency cannot just stop at your physical exercise, though. This consistency has to extend into another important part of your routine, which is your diet.

2. Watch Your Diet

Maintain a good diet to reach your fitness goals.

Many people only focus on the gym and exercise component of attaining fitness goals. As mentioned before, your diet is one of the most important parts of your fitness regimen, but having a great diet, regardless of your fitness goals, will impact whether or not you are successful in your goals as much or more than actual exercise. This is because your body will reflect what you eat and your diet can either progress your goals further or set you back.

It may be helpful for you to keep a log of what you eat and determine which foods you need to eliminate and which foods you need to add. In addition, you also want to be mindful of when you are eating, because it can also affect your performance in the gym.

For those who are bodybuilding or looking to build muscle, it’s recommended to incorporate some kind of carbohydrates before a workout session, and then have a protein-heavy meal once you are finished to speed up the recovery process. Protein shakes are a popular commodity in this regard. However, different protein powders can have different vitamins, minerals, and ingredients that can be more effective for men or women.

Ladies can check out a variety of protein powders to see what’s available for their needs. There tend to be more protein powders available for men that already have the extra minerals and vitamins included to help them get gains. So when guys are searching for the best protein powder, it’s better to decide if they’re trying to get lean or gain weight.

3. Have Realistic Expectations

Having the right mindset is imperative to achieve the fitness goals of any kind, and it starts by having realistic expectations. If you don’t like what you see in the mirror, then you have to work hard to see a change. However, if you are looking to shed some pounds and reduce your waistline, you can’t expect it to be done within a week.

Realistic expectations directly correlate with being consistent. Gaining weight means you will need to take the time to increase the amount of food in your diet and the number of weight-bearing activities that you engage in.

Losing weight will take a gradual amount of time with you engaging in vigorous cardio and making healthy choices. Your body cannot adapt to the changes that you plan to make overnight.

Published by: chazcheadle in The Programming Mechanism
Tags: , , ,