Skip to content

Use zen_get_products_name and account for empty model number in add-product dropdown. #243

@proseLA

Description

@proseLA

i am not sure how long i have railed against stuff like this in various plugins:

foreach ($result as $product) {
$ProductOptions .=
'<option value="' . $product['products_id'] . '">' .
$product['products_name'] .
' [' . $product['products_model'] . '] ' . ($product['products_status'] == 0 ? ' (OOS)' : '') .
'</option>' . PHP_EOL;
}

what is the purpose of having zen_get_products_name if we do not use it?

at some point, this PR will hopefully get merged, and we will now have something that better approaches a true product object.

does one really have to manually do all of this construction of what product name should be?

every time i see model included in some manually manipulated product name on anything to do with ZC, i truly feel people have just succumbed to whatever torvista wants.

some of my clients do not use product model, so every line item now has [] in it for no good reason.

can we at least embrace something that ZC provides us?

and please, i do not want to get into a discussion of database hits. with caching and websites being hosted on SSDs; these discussions are tiresome and so 2007....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions