Support » Plugin: WP Coupons and Deals » Where Can I edit Deals and Coupon words ?

  • Resolved lcwordpress

    (@lcwordpress)



    Hi there !!, I understand that you are working on the translation, meamwhile where can I change the types of coupons to reflect my language (Cupón and Oferta).
    Thanks a bunch
    Luis

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi,

    If you can edit codes, you can definitely do it yourself for now. Until the plugin is translation ready.

    The file you would need to change is wpcd-meta-boxes.php which is located in includes/classes/admin/ folder.

    Look for this part in the code.

    
    private $wpcd_fields = array(
    
    		array(
    			'id' => 'coupon-type',
    			'label' => 'Coupon Type',
    			'type' => 'select',
    			'help' => 'Coupon Type. Coupon will display a coupon code which will be copied when user clicks on it. Deal will display a link to get the deal instead of coupon code.',
     			'options' => array(
    				'Coupon',
    				'Deal',
    			),
    		),

    Change Coupon and Deal to your desired words.

    Let me know if it worked.

    Regards.

    Thanks but did not work .. I want to change the word on the display Page http://www.ahgconcordia.com.ar/promo-concordia-2/

    If I change it there does not change the word and it does not work since it seems you use those words as variables in else functions …

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi,

    Sorry about that. My bad. I failed to mention another change.

    You have to change this file too includes/functions/shortcode/default/wpcd-shortcode-discount-text.php

    Edit this part:

    ` <?php if ( $coupon_type == ‘Coupon’ ) { ?>
    <div class=”coupon-type”>
    <?php echo $coupon_type; ?>
    </div>
    <?php } elseif ( $coupon_type == ‘Deal’) { ?>
    <div class=”deal-type”>
    <?php echo $coupon_type; ?>
    </div>
    <?php } ?> `

    Change ‘Coupon’ and ‘Deal’ to words you used on the previous file.

    Also you have to update the coupons too. Because Coupon and Deal words are saved on the database. So when you update it will save the new words. And it should work.

    Let me know if it works.

    Regards.

    Thanks but did not work since on the screen where you create the coupon also seems that you are using if and else, so some options dissapear

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi,

    I apologize for the inconvenience.

    On this file assets/admin/js/admin.js – on the top change ‘Coupon’ to your word.

    I am hoping this will work. And again I am sorry for the trouble.

    Regards.

    That worked !! Now the coupon code is missing 🙁

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi,

    Here’s what you should do.

    Look for ( $coupon_type == 'Coupon' ) and ( $coupon_type == 'Deal') and replace ‘Coupon’ and ‘Deal’ with your word.

    I know it’s not efficient and a bit time consuming, but it’s the only thing I can think of right now. If you are using any code editors, open the plugin folder with it. There should be an option ‘Search in directory’ or ‘Find in Path’. Then find those two condition and replace.

    I will make the plugin translation ready ASAP. I promise.

    Thank you for all the patience.

    Regards.

    Thanks a bunch ! I downloaded the plugin and searched and replaced those terms with an html editor ! Worked like a charm !

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hey,

    I am really glad it worked out.

    If you need any other help do let me know.

    Regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Where Can I edit Deals and Coupon words ?’ is closed to new replies.