Post by khnaz35 » Mon Jul 27, 2020 4:49 pm

Hi everyone,
I have installed opencart 3.0.3.5 with J3, am adding a recurring payment profile in my product. Currently product page shows like this https://prnt.sc/tp5b94
I want to change the text "payment profile" to "xxxxxyzz" and i want to show all the recurring payment options like this https://prnt.sc/tp5efs so customer can chose what ever they like. I don't want to use dropdown menu option.
Any help will be highly appreciated.
Regards
Khnaz35

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by khnaz35 » Mon Jul 27, 2020 5:00 pm

Hi,
Just a quick update as for text part change i already change it from the langue text. Now remaining is Showing all the available recurring profile on the page itself rather then dropdown box.
Regards
Khnaz35

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by paulfeakins » Mon Jul 27, 2020 6:12 pm

khnaz35 wrote:
Mon Jul 27, 2020 4:49 pm
I have installed opencart 3.0.3.5 with J3
Well if you mean Journal 3 you won't get much help here, you should ask them.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by khnaz35 » Mon Jul 27, 2020 8:34 pm

Hi,
This is not related to j3, its opencart own functionality. Just want to change dropdown option to everything on the page, the rest will be same like selecting anyone option.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by khnaz35 » Tue Jul 28, 2020 11:26 am

Hi Guys, any suggestion or help.

I am trying to make the required changes on OC 3.0.3.5 version and i can see they have recurring profile i am currently working around it.
If you look here i have change the Recurring profile text to your subscription https://prnt.sc/tpmz4e.

Now second step i want to take is to show all the available subscription option on the page itself rather than dropdown menu. https://prnt.sc/tpmzt7 it should be like this https://prnt.sc/tpn03r.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by pprmkr » Wed Aug 05, 2020 2:50 pm

Find:

Code: Select all

              <select name="recurring_id" class="form-control">
                <option value="">{{ text_select }}</option>
                {% for recurring in recurrings %}
                <option value="{{ recurring.recurring_id }}">{{ recurring.name }}</option>
                {% endfor %}
              </select>
Remove the select field and use the loop to create new selectable options ( radio, checkbox) with the available values, all with the same name (recurring_id).

User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by pprmkr » Wed Aug 05, 2020 4:22 pm

Why by PM ?
khnaz35 wrote: what do you mean by create the loop ??? i want to make it like checkbox as was in screenshot
Better read my post again: use the loop to create new selectable options ...

Code: Select all

{% for recurring in recurrings %} YOUR_CODE_HERE {% endfor %}
And better not to use checkbox. Multiple options can be selected then.

User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by khnaz35 » Wed Aug 05, 2020 4:55 pm

pprmkr wrote:
Wed Aug 05, 2020 4:22 pm

Code: Select all

{% for recurring in recurrings %} YOUR_CODE_HERE {% endfor %}
And better not to use checkbox. Multiple options can be selected then.
i got stuck here guys ??? ??? any help
Last edited by khnaz35 on Sat Aug 08, 2020 1:14 pm, edited 1 time in total.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by pprmkr » Wed Aug 05, 2020 5:00 pm

That's a beautifull example ! I could not do it better.

User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by khnaz35 » Sat Aug 08, 2020 7:43 pm

i deleted this

Code: Select all

 <option value="">{{ text_select }}</option>
and output is like this now but https://prnt.sc/tw6ygu
its still show as drop down option and i couldn't find where it is getting like that the whole code is this

Code: Select all

{% if recurrings %}
            <h3 class="title recurring-title">{{ text_payment_recurring }}</h3>
            <div class="form-group required">
              <select name="recurring_id" class="form-control">
                <option value="">{{ text_select }}</option>
                {% for recurring in recurrings %}
                <option value="{{ recurring.recurring_id }}">{{ recurring.name }}</option>
                {% endfor %}
              </select>
              <div class="help-block" id="recurring-description"></div>
            </div>
          {% endif %}

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by khnaz35 » Sat Aug 08, 2020 9:39 pm

Thanks to ketas :

Code: Select all

{% if recurrings %}
            <h3 class="title recurring-title">{{ text_payment_recurring }}</h3>
            <div class="form-group required">
                {% for recurring in recurrings %}
<label class="radio">
<input type="radio" name="recurring_id" value="{{ recurring.recurring_id }}" />
                {{ recurring.name }}</label>
                {% endfor %}
             
              <div class="help-block" id="recurring-description"></div>
            </div>
          {% endif %}
but now have another issue add to cart button is not working with this.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by cyclops12 » Sat Aug 08, 2020 11:24 pm

Would it be something to do with the javascript at the bottom of product.twig ?
I.E

Code: Select all

data: $('input[name=\'product_id\'], input[name=\'quantity\'], select[name=\'recurring_id\']'),
Should this be changed as it is not SELECT any more

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by khnaz35 » Tue Aug 11, 2020 12:09 am

cyclops12 wrote:
Sat Aug 08, 2020 11:24 pm
Would it be something to do with the javascript at the bottom of product.twig ?
I.E

Code: Select all

data: $('input[name=\'product_id\'], input[name=\'quantity\'], select[name=\'recurring_id\']'),
Should this be changed as it is not SELECT any more
Thanks for pointing out the code has been updated and the twig is like this now

now is one more issue when i click on the recurring profile no matter what ever i chose their is only one description adding to cart.
https://prnt.sc/tx8pxp
https://prnt.sc/tx8qjd

i can confirm the admin side payment setting is correct

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by sw!tch » Tue Aug 11, 2020 6:03 am

If you provide a link to your site this would be easier.

Maybe try..

Code: Select all

 #product input[name="recurring_id"]:checked

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by khnaz35 » Tue Aug 11, 2020 1:49 pm

sw!tch wrote:
Tue Aug 11, 2020 6:03 am
If you provide a link to your site this would be easier.
have a look here
https://glowkl.com/index.php?route=prod ... uct_id=379

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by pprmkr » Tue Aug 11, 2020 3:07 pm

sw!tch wrote:
Tue Aug 11, 2020 6:03 am
Maybe try..

Code: Select all

 #product input[name="recurring_id"]:checked
Line 598:

Code: Select all

input[name=\'recurring_id\']
Line 622

Code: Select all

#product input[name="recurring_id"]
Both add:

Code: Select all

:checked

User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by khnaz35 » Tue Aug 11, 2020 3:19 pm

pprmkr wrote:
Tue Aug 11, 2020 3:07 pm
sw!tch wrote:
Tue Aug 11, 2020 6:03 am
Maybe try..

Code: Select all

 #product input[name="recurring_id"]:checked
Line 598:

Code: Select all

input[name=\'recurring_id\']
Line 622

Code: Select all

#product input[name="recurring_id"]
Both add:

Code: Select all

:checked
Thanks Roelie, this worked.
how about css side

Code: Select all

/******************************
 Default Options
*******************************/
.product-info .product-options .radio + .radio,
.product-info .product-options .checkbox + .checkbox {
  margin: 0; }

.product-info .product-options h3 {
  margin: 0; }

.product-info .product-options .img-thumbnail {
  border-radius: 0;
  border-width: 0;
  outline: none;
  padding: 0;
  background-color: transparent; }

.product-info .product-options .help-block {
  margin-bottom: 0; }
  .product-info .product-options .help-block:empty {
    margin: 0; }

.product-info .product-options .option-value {
  margin: 0 5px;
  line-height: 1.2; }

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by letxobnav » Tue Aug 11, 2020 3:30 pm

I would not do this:

Code: Select all

		beforeSend: function() {
			$('#recurring-description').html('');
		},
it makes your quantity and add to cart button go up and down when you select an option.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by kestas » Tue Aug 11, 2020 3:49 pm

I have send you edited product.twig file by email. Now should work like expected.

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by khnaz35 » Tue Aug 11, 2020 3:52 pm

kestas wrote:
Tue Aug 11, 2020 3:49 pm
I have send you edited product.twig file by email. Now should work like expected.
Thanks got your email.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 20 guests