Page 1 of 1

1.5.6.1 release candidate

Posted: Thu Nov 07, 2013 11:41 pm
by James
Guy please clone https://github.com/opencart/opencart
Switch to the 1.5.6.1 branch and provide any bug reports or fixes in this thread please. Consider this the Alpha release!

If you want to help, create a pull request for the bug. To do this; fork the repo to your own GitHub account, clone it, create your own patch branch (i.e. patch 1 etc) based off the 1.5.6.1 branch, then create a pull request back to the opencart/1.5.6.1 branch..Sorry for the crude "how to" but sure most people know how to do this?

IF the bug also affects the master branch, create a pull request for that too.

1 commit per pull request - its easier to manage.

Re: 1.5.6.1 release candidate

Posted: Sun Nov 10, 2013 4:11 am
by villagedefrance
Hi James,

Here is a code to correctly render the "Profile tab" in the Product form under Admin, when there is no profile.

This is the vQmod version of the fix, that I have made with LeorLindel's help, for v1.5.5.2 and v1.5.6.

Code: Select all

<file name="admin/view/template/catalog/product_form.tpl">
        <operation>
            <search position="replace" offset="51"><![CDATA[
        <div id="tab-profile">
		]]></search>
            <add><![CDATA[
        <div id="tab-profile">
            <table id="profile" class="list">
                <thead>
                    <tr>
                        <td class="left"><?php echo $entry_profile ?></td>
                        <td class="left"><?php echo $entry_customer_group ?></td>
                        <td class="left"></td>
                    </tr>
                </thead>
				<?php $profileCount = 0; ?>
                <?php foreach ($product_profiles as $product_profile) { ?>
			<tbody id="profile-row<?php echo $profileCount ?>">
				<tr>
					<td class="left">
					<select name="product_profiles[<?php echo $profileCount ?>][profile_id]">
						<?php foreach ($profiles as $profile) { ?>
							<?php if ($profile['profile_id'] == $product_profile['profile_id']) { ?>
								<option value="<?php echo $profile['profile_id'] ?>" selected="selected"><?php echo $profile['name'] ?></option>
							<?php } else { ?>
								<option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>
							<?php } ?>
						<?php } ?>
					</select>
					</td>
					<td class="left">
					<select name="product_profiles[<?php echo $profileCount ?>][customer_group_id]">
						<?php foreach ($customer_groups as $customer_group) { ?>
							<?php if ($customer_group['customer_group_id'] == $product_profile['customer_group_id']) { ?>
								<option value="<?php echo $customer_group['customer_group_id'] ?>" selected="selected"><?php echo $customer_group['name'] ?></option>
							<?php } else { ?>
								<option value="<?php echo $customer_group['customer_group_id'] ?>"><?php echo $customer_group['name'] ?></option>
							<?php } ?>
						<?php } ?>
					</select>
					</td>
					<td class="left"><a onclick="$('#profile-row<?php echo $profileCount ?>').remove();" class="button"><?php echo $button_remove; ?></a></td>
				</tr>
			</tbody>
			<?php $profileCount++ ?>
			<?php } ?>
                <tfoot>
                    <tr>
                        <td colspan="2"></td>
                        <td class="left"><a onclick="addProfile()" class="button"><?php echo $button_add_profile ?></a></td>
                    </tr>
                </tfoot>
            </table>
        </div>
			]]></add>
        </operation>


        <operation>
            <search position="replace" offset="28"><![CDATA[
var profileCount = <?php echo $profileCount ?>;
			]]></search>
            <add><![CDATA[
var profileCount = <?php echo $profileCount ?>;

function addProfile() {
	html  = '<tbody id="profile-row' + profileCount + '">'; 
	html += '<tr>';
	html += '  <td class="left">';
	html += '    <select name="product_profiles[' + profileCount + '][profile_id]">';
	<?php foreach ($profiles as $profile) { ?>
	html += '      <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>';
	<?php } ?>
	html += '    </select>';
	html += '  </td>';
	html += '  <td class="left">';
	html += '    <select name="product_profiles[' + profileCount + '][customer_group_id]">';
	<?php foreach ($customer_groups as $customer_group) { ?>
	html += '      <option value="<?php echo $customer_group['customer_group_id'] ?>"><?php echo $customer_group['name'] ?></option>';
	<?php } ?>
	html += '    <select>';
	html += '  </td>';
	html += '  <td class="left">';
	html += '    <a class="button" onclick="$(\'#profile-row' + profileCount + '\').remove()"><?php echo $button_remove ?></a>';
	html += '  </td>';
	html += '</tr>';
	html += '</tbody>';
	
	$('#profile tfoot').before(html);
	
	profileCount++;
}
			]]></add>
        </operation>
	</file>
It is obviously in 2 parts : the html table itself and the "addProfile" javascript.
I think that Qphoria is going to like this code ;)

Re: 1.5.6.1 release candidate

Posted: Sat Dec 28, 2013 4:33 am
by villagedefrance
Hi all,

Although it looks like I am the only one participating on this topic ::) , I still would like to add a couple of things here, that in my opinion are important, and I think, should be adjusted in v1.5.6.1.

There are 4 main observations, mostly about Openbay Pro files :

1 - Hard coded english words in "admin\view\template\openbay\openbay_itemlist.tpl", which should be language variables to allow compatibility with Admin languages other than English.

2 - most Openbay files links ( <a href="...></a> ) are using the "target=_blank" tag. This is not Html Valid and should be replaced by javascript, like this :

Before : <a href="<?php echo $product['href_amazon'] ?>" target="_blank"> </a>
After : <a onclick="window.open('<?php echo $product['href_amazon'] ?>');" title=""> </a>

This will still open in a new tab/page in all browsers.

3 - Many Openbay image tags ( <img src="... /> ) Do Not have an "alt" tag ! Again, this is not Html Valid and should be fixed.

4 - Many Openbay images are being called using "<?php echo HTTPS_SERVER; ?>". This is really not necessary since the variable HTTPS_SERVER is defined in the admin "config.php" file.

Codes like this : <img src="<?php echo HTTPS_SERVER; ?>view/image/loading.gif" id="imageModuleUpdate" class="displayNone" />
Should be : <img src="view/image/loading.gif" id="imageModuleUpdate" class="displayNone" alt="" />

Ok, that's all for now.

To conclude, I would say that these are pretty basic html coding rules and all these ".tpl" files should have been checked for Html validity and tidied-up a long time ago!
The language variables are also very important since a complete translation of the Admin files cannot be done properly!

This is not directed to anyone in particular, it is simply constructive criticism, and I would even be ready to clean them all up myself if I was certain that my time wouldn't wasted. I have been working with 1.5.6.1 for the last few weeks and I really think it is the best version so far. It is very good, but sadly it is not perfect ...

Re: 1.5.6.1 release candidate

Posted: Sat Dec 28, 2013 5:49 am
by James
Thanks @villagedefrance

I'll get these looked at and updated. There was massive changes on the 1.5.6.1 OpenBay files compared to 1.5.6 but its still a while off perfect standards, its a separate repo and can be updated separate to OpenCart at any time so its not as critical as the main OpenCart ones. There is / was also 4 different developers working on it at times so standards do vary slightly.

Cheers, J

Re: 1.5.6.1 release candidate

Posted: Sat Dec 28, 2013 5:13 pm
by villagedefrance
Thanks James,

Let me know if I can help.

Re: 1.5.6.1 release candidate

Posted: Tue Dec 31, 2013 7:29 pm
by James
1.5.6.1 is being released next week guys, probably 6th January.

I am sending out an email about it now to those of you who are subscribed to the "developer news" section of the newsletter.

Re: 1.5.6.1 release candidate

Posted: Tue Dec 31, 2013 7:59 pm
by OSWorX
James wrote:1.5.6.1 is being released next week guys, probably 6th January.

I am sending out an email about it now to those of you who are subscribed to the "developer news" section of the newsletter.
Maybe I have overseen something, but where can I find this section 'developer news"?
Currently I see only the 'standard' newsletter subscription in the footer of this page.

Re: 1.5.6.1 release candidate

Posted: Tue Dec 31, 2013 8:20 pm
by James
That was the old sign-up. The forum uses different templates so goes to a different place. Its been updated.

Re: 1.5.6.1 release candidate

Posted: Tue Dec 31, 2013 9:27 pm
by OSWorX
James wrote:That was the old sign-up. The forum uses different templates so goes to a different place. Its been updated.
Thx - now it is the new form.

Re: 1.5.6.1 release candidate

Posted: Fri Jan 03, 2014 2:16 am
by ADD Creative
Have you had chance to go through some of the issues fixed in CE? https://github.com/opencart-ce/opencart ... its/master

Re: 1.5.6.1 release candidate

Posted: Fri Jan 03, 2014 2:36 am
by James
Hmmmm, very good point. The developer who did has left our company - and no idea where his repo's are now and never did the PR's.

I'll go through them, if anyone else would care to help out too?

Re: 1.5.6.1 release candidate

Posted: Sat Jan 04, 2014 1:24 am
by ADD Creative
If there are any commits is CE that you want pull requests to the 1.5.6.1 branch doing, just let me know which ones and I'll try and make time to do some if I can.

Re: 1.5.6.1 release candidate

Posted: Fri Jan 17, 2014 7:11 am
by pedro1993
Sorry I didn't really get involved with this. Been busy.. be sure to put the next one on GitHub and I will contribute :)

Peter