Skip to content

Commit

Permalink
3.0.5Beta
Browse files Browse the repository at this point in the history
3.0.5Beta
  • Loading branch information
PhocaCz committed Mar 9, 2020
1 parent a7fa309 commit e41a077
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion admin/libraries/phocacart/attribute/attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function getTypeArray($returnId = 0, $returnValue = 0, $returnFull
'11' => array(JText::_('COM_PHOCACART_ATTR_TYPE_TEXTAREA_2048'), ''),
);

if ((int)$returnValue > 0 && (int)$returnValue > 0) {
if ((int)$returnId > 0 && (int)$returnValue > 0) {
return $o[(int)$returnId][(int)$returnValue];//returnValue: 0 ... Title, 1 ... Default Value Type
}

Expand Down Expand Up @@ -236,6 +236,9 @@ public static function storeAttributesById($productId, $attributesArray, $new =

foreach($attributesArray as $k => $v) {

if(empty($v['title'])) {
$v['title'] = JFactory::getDate()->format("Y-m-d-H-i-s");
}

if(empty($v['alias'])) {
$v['alias'] = $v['title'];
Expand Down
2 changes: 1 addition & 1 deletion admin/models/forms/subform_attributes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<field name="id" type="text" default="0" label="JGLOBAL_FIELD_ID_LABEL" readonly="true" class="readonly hidden" hidden="true" />

<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC" />
<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC" required="true" />

<field name="alias" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_ALIAS_LABEL" description="COM_PHOCACART_FIELD_ALIAS_DESC" />

Expand Down
2 changes: 1 addition & 1 deletion admin/models/forms/subform_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<field name="id" type="text" default="0" label="JGLOBAL_FIELD_ID_LABEL" readonly="true" class="readonly hidden" hidden="true"/>

<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC"/>
<field name="title" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_TITLE_LABEL" description="COM_PHOCACART_FIELD_TITLE_DESC" required="true" />

<field name="alias" type="text" class="inputbox" size="40" label="COM_PHOCACART_FIELD_ALIAS_LABEL" description="COM_PHOCACART_FIELD_ALIAS_DESC"/>

Expand Down
1 change: 1 addition & 0 deletions admin/models/phocacartitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public function getItem($pk = null) {

return $item;
}


protected function prepareTable($table) {
jimport('joomla.filter.output');
Expand Down

0 comments on commit e41a077

Please sign in to comment.