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.
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.
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.
It is obviously in 2 parts : the html table itself and the "addProfile" javascript.
I think that Qphoria is going to like this code
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>
I think that Qphoria is going to like this code

OpenCart custom solutions @ https://villagedefrance.net
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 ...
Although it looks like I am the only one participating on this topic

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 ...
OpenCart custom solutions @ https://villagedefrance.net
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
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
Maybe I have overseen something, but where can I find this section 'developer news"?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.
Currently I see only the 'standard' newsletter subscription in the footer of this page.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Thx - now it is the new form.James wrote:That was the old sign-up. The forum uses different templates so goes to a different place. Its been updated.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Have you had chance to go through some of the issues fixed in CE? https://github.com/opencart-ce/opencart ... its/master
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.
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

Peter
For OpenCart & PHP/MySQL support feel free to PM me
Click here for my extentions
Did I help you? Donate here to show support
Who is online
Users browsing this forum: No registered users and 0 guests